version 2.20
icon change EDockWidget improvements EMainWindow small refactoring Graphic now remember last loaded graphics style and restore it on setGraphicsCount
This commit is contained in:
@@ -88,59 +88,47 @@ public:
|
||||
void setRecentMenu(QMenu * m);
|
||||
|
||||
int maxRecentItems() const { return max_recent; }
|
||||
bool isChanged() const { return is_changed; }
|
||||
|
||||
protected:
|
||||
// Qt`s overloaded
|
||||
void showEvent(QShowEvent *);
|
||||
void closeEvent(QCloseEvent *);
|
||||
bool eventFilter(QObject * o, QEvent * e);
|
||||
void changeEvent(QEvent * e);
|
||||
QMenu * createPopupMenu();
|
||||
void addToRecent(const QString & path);
|
||||
void prepareRecent();
|
||||
void showEvent(QShowEvent *) override;
|
||||
void closeEvent(QCloseEvent *) override;
|
||||
bool eventFilter(QObject * o, QEvent * e) override;
|
||||
void changeEvent(QEvent * e) override;
|
||||
QMenu * createPopupMenu() override;
|
||||
|
||||
void init(const QString & config) {
|
||||
session.setFile(config);
|
||||
initMenus();
|
||||
initSession();
|
||||
loadSession();
|
||||
} // unusable
|
||||
void saveSession();
|
||||
void loadSession();
|
||||
virtual void savingSession(QPIConfig & conf) {}
|
||||
void setChanged(bool yes = true);
|
||||
void addToRecent(const QString & path);
|
||||
|
||||
virtual void loadingSession(QPIConfig & conf) {}
|
||||
virtual void savingSession(QPIConfig & conf) {}
|
||||
virtual QSize dockTabsIconSize() const { return iconSize(); }
|
||||
virtual QString loadFilter() { return "All files(*)"; }
|
||||
virtual QString saveFilter() { return "All files(*)"; }
|
||||
|
||||
SessionManager session;
|
||||
QString file_name;
|
||||
|
||||
private:
|
||||
void prepareRecent();
|
||||
|
||||
bool checkSave();
|
||||
void setChanged(bool yes = true) {
|
||||
isChanged = yes;
|
||||
setWindowModified(yes);
|
||||
}
|
||||
|
||||
void initMenus();
|
||||
void initDocks();
|
||||
void initSession();
|
||||
|
||||
QAction action_show_all_tools, action_hide_all_tools, action_show_all_docks, action_hide_all_docks;
|
||||
QString file_name;
|
||||
QList<QTabBar *> tbars;
|
||||
QList<QDockWidget *> tdocks;
|
||||
QList<QAction *> actions_recent;
|
||||
QAction * action_clear_recent;
|
||||
QMenu * menu_recent;
|
||||
SessionManager session;
|
||||
bool isChanged, first_show;
|
||||
bool is_changed;
|
||||
int max_recent;
|
||||
|
||||
private slots:
|
||||
void changedDock();
|
||||
void sessionLoading(QPIConfig & conf) { loadingSession(conf); }
|
||||
void sessionSaving(QPIConfig & conf) { savingSession(conf); }
|
||||
void closeDock(int index);
|
||||
void recentTriggered();
|
||||
|
||||
public slots:
|
||||
void setMaxRecentItems(int mr);
|
||||
void changed() { setChanged(true); }
|
||||
@@ -152,6 +140,11 @@ public slots:
|
||||
bool saveAsFile();
|
||||
void clearRecent();
|
||||
|
||||
private slots:
|
||||
void changedDock();
|
||||
void closeDock(int index);
|
||||
void recentTriggered();
|
||||
|
||||
signals:
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user