~narrow-m/mcplanner/trunk

« back to all changes in this revision

Viewing changes to enumcombobox.h

  • Committer: Moritz Schmale
  • Date: 2011-01-09 23:40:11 UTC
  • Revision ID: narrow.m@gmail.com-20110109234011-b2cv8dbhildd41z2
First commit.
Features:
-Drawing Blocks on multiple Layers
-Saving, Loading
-Choosing Block to draw from an iconed list
-Generating a plain Block of specifieable height width and depth as well as top and fill BlockType.
-PainterlyPack is used for the artwork. In later Versions, you can specify an own terrain.png to use your favorite artwork.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef ENUMCOMBOBOX_H
 
2
#define ENUMCOMBOBOX_H
 
3
 
 
4
#include <QComboBox>
 
5
#include <QMap>
 
6
 
 
7
class EnumComboBox : public QComboBox
 
8
{
 
9
    Q_OBJECT
 
10
public:
 
11
    explicit EnumComboBox(QWidget *parent = 0);
 
12
    void addItems(QMap<int,QString> enumStrings);
 
13
signals:
 
14
    void currentEnumIndexChanged(int type);
 
15
public slots:
 
16
    void setCurrentIndex(int type);
 
17
    void clear();
 
18
private:
 
19
    int myCurrentIndex;
 
20
    QMap<int,QString> myEnumString;
 
21
    QList<int> myIntEnum;
 
22
    QStringList myIntString;
 
23
    
 
24
private slots:
 
25
    void onIndexChanged(int index);
 
26
};
 
27
 
 
28
#endif // ENUMCOMBOBOX_H