git-svn-id: svn://db.shs.com.ru/libs@422 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -13,6 +13,16 @@ void SessionManager::setFile(const QString & file) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SessionManager::removeMainWidget(QWidget * e) {
|
||||||
|
for (int i = 0; i < widgets.size(); ++i) {
|
||||||
|
if (widgets[i].first == e->objectName()) {
|
||||||
|
widgets.remove(i);
|
||||||
|
--i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SessionManager::save() {
|
void SessionManager::save() {
|
||||||
if (file_.isEmpty()) return;
|
if (file_.isEmpty()) return;
|
||||||
QPIConfig sr(file_);
|
QPIConfig sr(file_);
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public:
|
|||||||
void addEntry(QAbstractButton * e) {buttons.push_back(QPair<QString, QAbstractButton * >(e->objectName(), e));}
|
void addEntry(QAbstractButton * e) {buttons.push_back(QPair<QString, QAbstractButton * >(e->objectName(), e));}
|
||||||
void addEntry(QStackedWidget * e) {stacks.push_back(QPair<QString, QStackedWidget * >(e->objectName(), e));}
|
void addEntry(QStackedWidget * e) {stacks.push_back(QPair<QString, QStackedWidget * >(e->objectName(), e));}
|
||||||
void addMainWidget(QWidget * e) {widgets.push_back(QPair<QString, QWidget * >(e->objectName(), e));}
|
void addMainWidget(QWidget * e) {widgets.push_back(QPair<QString, QWidget * >(e->objectName(), e));}
|
||||||
|
void removeMainWidget(QWidget * e);
|
||||||
|
|
||||||
void addEntry(const QString & name, QMainWindow * e) {mwindows.push_back(QPair<QString, QMainWindow * >(name, e));}
|
void addEntry(const QString & name, QMainWindow * e) {mwindows.push_back(QPair<QString, QMainWindow * >(name, e));}
|
||||||
void addEntry(const QString & name, QCheckBox * e) {checks.push_back(QPair<QString, QCheckBox * >(name, e));}
|
void addEntry(const QString & name, QCheckBox * e) {checks.push_back(QPair<QString, QCheckBox * >(name, e));}
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ void QGLView::drawBackground(QPainter * painter, const QRectF & rect) {
|
|||||||
painter_ = painter;
|
painter_ = painter;
|
||||||
painter_->beginNativePainting();
|
painter_->beginNativePainting();
|
||||||
if (is_first_draw) {
|
if (is_first_draw) {
|
||||||
|
//connect(context(), SIGNAL(aboutToBeDestroyed()), this, SLOT(glCleanup()));
|
||||||
resizeGL(viewport()->width(), viewport()->height());
|
resizeGL(viewport()->width(), viewport()->height());
|
||||||
initializeGL();
|
initializeGL();
|
||||||
}
|
}
|
||||||
@@ -731,3 +732,13 @@ bool QGLView::setupViewport() {
|
|||||||
setViewport(_w);
|
setViewport(_w);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void QGLView::glCleanup() {
|
||||||
|
//qDebug() << "cleanup";
|
||||||
|
/*disconnect(context(), SIGNAL(aboutToBeDestroyed()), this, SLOT(glCleanup()));
|
||||||
|
is_first_draw = true;
|
||||||
|
textures_manager = GLTextureManager();
|
||||||
|
currentQGLView = 0;
|
||||||
|
currentGLTextureManager = 0;*/
|
||||||
|
}
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ public slots:
|
|||||||
|
|
||||||
void reloadShaders() {if (renderer_ != 0) renderer_->reloadShaders(); reloadThisShaders();}
|
void reloadShaders() {if (renderer_ != 0) renderer_->reloadShaders(); reloadThisShaders();}
|
||||||
void deselect() {sel_obj = 0;}
|
void deselect() {sel_obj = 0;}
|
||||||
|
void glCleanup();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void glBeforePaint();
|
void glBeforePaint();
|
||||||
|
|||||||
Reference in New Issue
Block a user