git-svn-id: svn://db.shs.com.ru/libs@416 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
#include <QApplication>
|
||||
#include <QFileInfo>
|
||||
#include "session_manager.h"
|
||||
|
||||
|
||||
void SessionManager::setFile(const QString & file) {
|
||||
QFileInfo fi(file);
|
||||
if (fi.isAbsolute()) {
|
||||
file_ = file;
|
||||
return;
|
||||
}
|
||||
file_ = QApplication::applicationDirPath() + "/" + file;
|
||||
}
|
||||
|
||||
|
||||
void SessionManager::save() {
|
||||
if (file_.isEmpty()) return;
|
||||
QPIConfig sr(file_);
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
SessionManager(const QString & file = QString()) {setFile(file);}
|
||||
~SessionManager() {;}
|
||||
|
||||
void setFile(const QString & file) {file_ = file;}
|
||||
void setFile(const QString & file);
|
||||
|
||||
void addEntry(QMainWindow * e) {mwindows.push_back(QPair<QString, QMainWindow * >(e->objectName(), e));}
|
||||
void addEntry(QCheckBox * e) {checks.push_back(QPair<QString, QCheckBox * >(e->objectName(), e));}
|
||||
|
||||
Reference in New Issue
Block a user