diff options
-rw-r--r-- | src/assignmentList.cpp | 18 | ||||
-rw-r--r-- | src/assignmentList.h | 2 |
2 files changed, 7 insertions, 13 deletions
diff --git a/src/assignmentList.cpp b/src/assignmentList.cpp index eab794a..c8da5c3 100644 --- a/src/assignmentList.cpp +++ b/src/assignmentList.cpp @@ -21,25 +21,21 @@ AssignmentList::AssignmentList() { } void AssignmentList::initializeUI() { - this->createMenu(); - this->createToolbar(); - //Config() // from config.h - this->setupDB(); - this->displayWidgets(); - this->show(); -} - -void AssignmentList::createMenu() { + // create menu connections QObject::connect(ui.actionPreferences, &QAction::triggered, this, &AssignmentList::preferences); QObject::connect(ui.actionReload, &QAction::triggered, this, &AssignmentList::reload); QObject::connect(ui.actionExit, &QAction::triggered, this, QApplication::quit); QObject::connect(ui.actionAdd_Group, &QAction::triggered, this, &AssignmentList::addGroup); QObject::connect(ui.actionClean_Hidden, &QAction::triggered, this, &AssignmentList::cleanHidden); QObject::connect(ui.actionAbout, &QAction::triggered, this, &AssignmentList::aboutDialog); -} -void AssignmentList::createToolbar() { + // create toolbar ui.toolBar->addAction(ui.actionAdd_Group); + + //Config() // from config.h + this->setupDB(); + this->displayWidgets(); + this->show(); } void AssignmentList::setupDB() { diff --git a/src/assignmentList.h b/src/assignmentList.h index d87397c..8171d73 100644 --- a/src/assignmentList.h +++ b/src/assignmentList.h @@ -14,8 +14,6 @@ class AssignmentList : public QMainWindow { Ui::MainWindow ui; void initializeUI(); - void createMenu(); - void createToolbar(); void setupDB(); void displayWidgets(); void editGroup(int id); |