Sun, 30 Aug 2015 05:16:07 +0300
More refactor
src/configDialog.cpp | file | annotate | diff | comparison | revisions | |
src/mainwindow.h | file | annotate | diff | comparison | revisions |
--- a/src/configDialog.cpp Sun Aug 30 04:57:09 2015 +0300 +++ b/src/configDialog.cpp Sun Aug 30 05:16:07 2015 +0300 @@ -697,7 +697,10 @@ QDialog (parent, f), seq (seq) { lb_output = new QLabel; - IMPLEMENT_DIALOG_BUTTONS + + bbx_buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel); \ + connect (bbx_buttons, SIGNAL (accepted()), this, SLOT (accept())); \ + connect (bbx_buttons, SIGNAL (rejected()), this, SLOT (reject())); \ setWhatsThis (tr ("Into this dialog you can input a key sequence for use as a " "shortcut in LDForge. Use OK to confirm the new shortcut and Cancel to "
--- a/src/mainwindow.h Sun Aug 30 04:57:09 2015 +0300 +++ b/src/mainwindow.h Sun Aug 30 05:16:07 2015 +0300 @@ -37,22 +37,16 @@ class Ui_LDForgeUI; struct Primitive; -// Stuff for dialogs -#define IMPLEMENT_DIALOG_BUTTONS \ - bbx_buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel); \ - connect (bbx_buttons, SIGNAL (accepted()), this, SLOT (accept())); \ - connect (bbx_buttons, SIGNAL (rejected()), this, SLOT (reject())); \ - class LDQuickColor { PROPERTY (public, LDColor, color, setColor, STOCK_WRITE) PROPERTY (public, QToolButton*, toolButton, setToolButton, STOCK_WRITE) - public: - LDQuickColor (LDColor color, QToolButton* toolButton); - bool isSeparator() const; +public: + LDQuickColor (LDColor color, QToolButton* toolButton); + bool isSeparator() const; - static LDQuickColor getSeparator(); + static LDQuickColor getSeparator(); }; //