git-svn-id: svn://db.shs.com.ru/libs@356 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -50,6 +50,7 @@ signals:
|
||||
class EMainWindow: public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int maxRecentItems READ maxRecentItems WRITE setMaxRecentItems)
|
||||
public:
|
||||
EMainWindow(QWidget * parent = 0);
|
||||
~EMainWindow();
|
||||
@@ -59,6 +60,11 @@ public:
|
||||
virtual bool save(const QString & path) {return true;}
|
||||
|
||||
void addSeparator() {}
|
||||
void setRecentFiles(const QStringList & rl);
|
||||
QStringList recentFiles() const;
|
||||
void setRecentMenu(QMenu * m);
|
||||
|
||||
int maxRecentItems() const {return max_recent;}
|
||||
|
||||
protected:
|
||||
// Qt`s overloaded
|
||||
@@ -67,6 +73,8 @@ protected:
|
||||
bool eventFilter(QObject * o, QEvent * e);
|
||||
void timerEvent(QTimerEvent * e);
|
||||
QMenu * createPopupMenu();
|
||||
void addToRecent(const QString & path);
|
||||
void prepareRecent();
|
||||
|
||||
void init(const QString & config) {session.setFile(config); initMenus(); initSession(); loadSession();} // unusable
|
||||
void saveSession();
|
||||
@@ -87,9 +95,12 @@ protected:
|
||||
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;
|
||||
int tid;
|
||||
int tid, max_recent;
|
||||
|
||||
private slots:
|
||||
void changedDock();
|
||||
@@ -97,13 +108,16 @@ private slots:
|
||||
void sessionSaving(QPIConfig & conf) {savingSession(conf);}
|
||||
// void changedDockClose(QObject * dock);
|
||||
void closeDock(int index);
|
||||
void recentTriggered();
|
||||
|
||||
public slots:
|
||||
void setMaxRecentItems(int mr);
|
||||
void changed() {setChanged(true);}
|
||||
void newFile();
|
||||
void openFile();
|
||||
bool saveFile(bool ask = false);
|
||||
bool saveAsFile();
|
||||
void clearRecent();
|
||||
|
||||
signals:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user