-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix buttons order in the InsertDialog
- Loading branch information
Showing
5 changed files
with
177 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,37 @@ | ||
#pragma once | ||
|
||
#include <QDialogButtonBox> | ||
#include <QWidget> | ||
#include "ui_insertdialogbuttons.h" | ||
|
||
namespace pboman3::ui { | ||
class InsertDialogButtons : public QDialogButtonBox { | ||
Q_OBJECT | ||
class InsertDialogButtons : public QWidget { | ||
Q_OBJECT | ||
|
||
public: | ||
InsertDialogButtons(QWidget* parent = nullptr); | ||
|
||
void setIsTwoStep(); | ||
~InsertDialogButtons() override; | ||
|
||
void setIsTwoStep() const; | ||
|
||
signals: | ||
void next(); | ||
|
||
void back(); | ||
|
||
void ok(); | ||
|
||
void cancel(); | ||
|
||
private: | ||
QPushButton* btnNext_; | ||
QPushButton* btnBack_; | ||
Ui::InsertDialogButtons* ui_; | ||
|
||
void onNextClick(); | ||
|
||
void onBackClick(); | ||
|
||
void onOkClick(); | ||
|
||
void onButtonClicked(const QAbstractButton* btn); | ||
void onCancelClick(); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>InsertDialogButtons</class> | ||
<widget class="QWidget" name="InsertDialogButtons"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>538</width> | ||
<height>42</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="btnBack"> | ||
<property name="text"> | ||
<string>Back</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="btnNext"> | ||
<property name="text"> | ||
<string>Next</string> | ||
</property> | ||
<property name="shortcut"> | ||
<string>Return</string> | ||
</property> | ||
<property name="default"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="btnOk"> | ||
<property name="text"> | ||
<string>Ok</string> | ||
</property> | ||
<property name="shortcut"> | ||
<string>Return</string> | ||
</property> | ||
<property name="autoDefault"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="default"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="btnCancel"> | ||
<property name="text"> | ||
<string>Cancel</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |