File indexing completed on 2024-03-24 03:44:36
0001 /*************************************************************************** 0002 * Copyright (C) 2004-2007 by Albert Astals Cid * 0003 * aacid@kde.org * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 ***************************************************************************/ 0010 0011 #ifndef KGEOGRAPHY_H 0012 #define KGEOGRAPHY_H 0013 0014 #include <kxmlguiwindow.h> 0015 0016 class KToggleAction; 0017 0018 class QLabel; 0019 class QPushButton; 0020 class QVBoxLayout; 0021 0022 class KGmap; 0023 class askWidget; 0024 0025 class kgeography : public KXmlGuiWindow 0026 { 0027 Q_OBJECT 0028 public: 0029 kgeography(); 0030 ~kgeography(); 0031 0032 protected: 0033 void showEvent(QShowEvent *e) override; 0034 0035 private Q_SLOTS: 0036 void openMap(); 0037 0038 void consult(); 0039 void askCapitalDivisions(); 0040 void askDivisionCapitals(); 0041 void askMap(); 0042 void askPlaceMap(); 0043 void askFlagDivisions(); 0044 void askDivisionFlags(); 0045 void disclaimer(); 0046 void showMapAuthor(); 0047 void resizeMainWindow(); 0048 void questionsEnded(); 0049 0050 void setAutomaticZoom(bool b); 0051 void setMoveActionEnabled(bool b); 0052 0053 void showPreferencesDialog(); 0054 void updateConfiguration(); 0055 0056 private: 0057 QSize getPreferredSize(); 0058 void showResultsDialog(); 0059 0060 void putAskWidget(); 0061 void removeOldAskWidget(); 0062 void setMap(KGmap *m); 0063 0064 int askQuestionNumber(int upto, bool *rOK); 0065 0066 0067 QWidget *p_bigWidget; 0068 QWidget *p_underLeftWidget; 0069 0070 QPushButton *p_consult; 0071 QPushButton *p_askCapitalDivisions; 0072 QPushButton *p_askDivisionCapitals; 0073 QPushButton *p_askMap; 0074 QPushButton *p_askPlaceMap; 0075 QPushButton *p_askFlagDivisions; 0076 QPushButton *p_askDivisionFlags; 0077 KToggleAction *p_zoom; 0078 KToggleAction *p_move; 0079 KToggleAction *p_zoomAutomatic; 0080 QAction *p_zoomOriginal; 0081 QAction *p_showAuthor; 0082 QLabel *p_currentMap; 0083 0084 KGmap *p_map; 0085 askWidget *p_askWidget; 0086 bool p_firstShow, p_mustShowResultsDialog; 0087 0088 QVBoxLayout *m_underLeftWidgetLayout; 0089 }; 0090 0091 #endif