First tab at building a mechanism where tabpages can supply a list of actions that are added to the global main toolbar.
This commit is contained in:
parent
c2d725ec6d
commit
3d516e6006
10 changed files with 130 additions and 26 deletions
|
|
@ -33,6 +33,7 @@ class MasterController;
|
|||
class QCloseEvent;
|
||||
class OpenDatabase;
|
||||
class PgClass;
|
||||
class PlgPage;
|
||||
|
||||
class MainWindow : public ASyncWindow {
|
||||
Q_OBJECT
|
||||
|
|
@ -53,6 +54,7 @@ private:
|
|||
std::shared_ptr<OpenDatabase> m_database;
|
||||
|
||||
MasterController *m_masterController;
|
||||
PlgPage *m_previousPage = nullptr; ///< tracks which pages buttons were previously being displayed
|
||||
|
||||
class QLoad : public QueuedBackgroundTask {
|
||||
public:
|
||||
|
|
@ -90,6 +92,14 @@ private:
|
|||
|
||||
void catalogLoaded();
|
||||
|
||||
/// Called when a newly created page is added to the QTabWidget
|
||||
void addPage(PlgPage* page, QString caption);
|
||||
/// Called when a page is completely removed from the QTabWidget
|
||||
void removePage(PlgPage *page);
|
||||
|
||||
void addToolBarButtonsForPage(PlgPage *page);
|
||||
void removeToolBarButtonsForPage(PlgPage *page);
|
||||
//class PageData
|
||||
private slots:
|
||||
|
||||
void on_actionLoad_SQL_triggered();
|
||||
|
|
@ -109,6 +119,7 @@ private slots:
|
|||
void on_actionCopy_triggered();
|
||||
void on_actionCopy_as_C_string_triggered();
|
||||
void on_actionCopy_as_raw_Cpp_string_triggered();
|
||||
void on_tabWidget_currentChanged(int index);
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue