added "new map" button
fixed minor model/logic issues
This commit is contained in:
@@ -7,15 +7,21 @@ ActionWidget::ActionWidget(QWidget *parent) : QWidget(parent) {
|
||||
|
||||
QHBoxLayout* lay = new QHBoxLayout(this);
|
||||
|
||||
|
||||
QPushButton* btnNew = new QPushButton("new");
|
||||
lay->addWidget(btnNew);
|
||||
|
||||
QPushButton* btnLoad = new QPushButton("load");
|
||||
lay->addWidget(btnLoad);
|
||||
|
||||
QPushButton* btnSave = new QPushButton("save");
|
||||
lay->addWidget(btnSave);
|
||||
|
||||
// events
|
||||
connect(btnNew, SIGNAL(clicked(bool)), this, SIGNAL(onNew()));
|
||||
|
||||
connect(btnLoad, SIGNAL(clicked(bool)), this, SIGNAL(onLoad()));
|
||||
|
||||
connect(btnSave, SIGNAL(clicked(bool)), this, SIGNAL(onSave()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,10 +13,15 @@ public:
|
||||
|
||||
signals:
|
||||
|
||||
/** request: load a map */
|
||||
void onLoad();
|
||||
|
||||
/** request: save a map */
|
||||
void onSave();
|
||||
|
||||
/** request: new map */
|
||||
void onNew();
|
||||
|
||||
public slots:
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user