QTfrontend/ui/widget/mapContainer.h
changeset 8377 869f80966a77
parent 7258 722e8a0d89dc
child 8393 85bd6c7b2641
--- a/QTfrontend/ui/widget/mapContainer.h	Mon Jan 14 12:07:06 2013 +0400
+++ b/QTfrontend/ui/widget/mapContainer.h	Mon Jan 14 11:19:59 2013 +0100
@@ -22,6 +22,7 @@
 
 #include <QWidget>
 #include <QGridLayout>
+#include <QVBoxLayout>
 #include <QComboBox>
 #include <QLabel>
 #include <QByteArray>
@@ -37,6 +38,7 @@
 class IconedGroupBox;
 class QListView;
 class SeparatorPainter;
+class QListWidget;
 
 class MapFileErrorException
 {
@@ -46,6 +48,8 @@
 {
         Q_OBJECT
 
+        Q_PROPERTY(bool master READ isMaster WRITE setMaster)
+
     public:
         HWMapContainer(QWidget * parent=0);
         QString getCurrentSeed() const;
@@ -62,6 +66,7 @@
         DrawMapScene * getDrawMapScene();
         void mapDrawingFinished();
         QLineEdit* seedEdit;
+        bool isMaster();
 
     public slots:
         void askForGeneratedPreview();
@@ -75,6 +80,7 @@
         void setAllMapParameters(const QString & map, MapGenerator m, int mazesize, const QString & seed, int tmpl);
         void updateModelViews();
         void onPreviewMapDestroyed(QObject * map);
+        void setMaster(bool master);
 
     signals:
         void seedChanged(const QString & seed);
@@ -89,22 +95,28 @@
     private slots:
         void setImage(const QImage newImage);
         void setHHLimit(int hhLimit);
-        void mapChanged(int index);
         void setRandomSeed();
         void setRandomTheme();
         void setRandomMap();
-        void themeSelected(const QModelIndex & current, const QModelIndex &);
         void addInfoToPreview(QPixmap image);
-        void seedEdited();
+        void setNewSeed(const QString & newSeed);
+        void mapTypeChanged(int);
+        void showThemePrompt();
+        void updateTheme(const QModelIndex & current);
+        void staticMapChanged(const QModelIndex & map, const QModelIndex & old = QModelIndex());
+        void missionMapChanged(const QModelIndex & map, const QModelIndex & old = QModelIndex());
+        void loadDrawing();
+        void showSeedPrompt();
 
     protected:
         virtual void resizeEvent ( QResizeEvent * event );
 
     private:
-        QGridLayout mainLayout;
-        QPushButton* imageButt;
+        QVBoxLayout mainLayout;
+        QLabel* mapPreview;
         QComboBox* chooseMap;
-        MapModel * m_mapModel;
+        MapModel * m_staticMapModel;
+        MapModel * m_missionMapModel;
         IconedGroupBox* gbThemes;
         QListView* lvThemes;
         ThemeModel * m_themeModel;
@@ -121,12 +133,30 @@
         QComboBox *cbMazeSize;
         MapGenerator mapgen;
         DrawMapScene drawMapScene;
+        QComboBox * cType;
+        QListView * staticMapList;
+        QListView * missionMapList;
+        QListWidget * generationStyles;
+        QListWidget * mazeStyles;
+        QLabel * lblMapList;
+        QLabel * lblDesc;
+        QPushButton * btnTheme;
+        QPushButton * btnLoadMap;
+        QPushButton * btnEditMap;
+        QPushButton * btnRandomize;
+        QString selectedTheme;
+        QPushButton * btnSeed;
+        bool m_master;
+        QList<QWidget *> m_childWidgets;
 
         void intSetSeed(const QString & seed);
         void intSetMap(const QString & map);
         void intSetMapgen(MapGenerator m);
         void intSetTemplateFilter(int);
         void intSetMazeSize(int size);
+        void mapChanged(const QModelIndex & map, int type, const QModelIndex & old = QModelIndex());
+        void setMapInfo(MapModel::MapInfo mapInfo);
+        void changeMapType(MapModel::MapType type, const QModelIndex & newMap = QModelIndex());
         void updatePreview();
 
         MapModel::MapInfo m_mapInfo;