Commit 7ae7227c authored by Denis Khachko's avatar Denis Khachko

Courses spliter pos

parent 62e35493
......@@ -740,8 +740,24 @@ void MainWindowTask::Close()
saveBaseKurs();
close();
};
void MainWindowTask::showEvent(QShowEvent * event)
{
ui->splitter->restoreState(settings->value("/SpliterState")
.toByteArray());
QByteArray settlist=settings->value("/SpliterPos").toByteArray();
qDebug()<<settlist;
ui->splitter->restoreGeometry(settlist);
};
void MainWindowTask::closeEvent(QCloseEvent *event)
{
settings->setValue("/SpliterPos",ui->splitter->saveGeometry());
settings->setValue("/SpliterState",ui->splitter->saveState());
qDebug()<<ui->splitter->saveGeometry();
qDebug()<<"CLOSE TASK WINDOW";
if(!course)return;
qDebug()<<"START CLOSE TASK WINDOW";
if(!cursWorkFile.exists())
......
......@@ -133,7 +133,7 @@ public slots:
protected:
void changeEvent(QEvent *e);
void closeEvent(QCloseEvent *event);
void showEvent(QShowEvent * event);
private:
void markProgChange();
void createMoveMenu();
......
......@@ -713,8 +713,28 @@ void MainWindowTask::Close()
//saveBaseKurs();
close();
};
void MainWindowTask::showEvent(QShowEvent * event)
{
QStringList settlist=settings->value("SpliterPos").toString().split(" ");
QList<int> sizes;
for(int i=0;i<settlist.count();i++ )
{
sizes.append(settlist.at(i).toInt());
}
ui->splitter->setSizes(sizes);
};
void MainWindowTask::closeEvent(QCloseEvent *event)
{
QString sizes="";
for(int i=0;i<ui->splitter->sizes().count();i++ )
{
sizes+=QString::number(ui->splitter->sizes().at(i))+" ";
}
settings->setValue("SpliterPos",sizes);
qDebug()<<"CLOSE TASK WINDOW";
if(!course)
{close();
return;
......@@ -738,8 +758,8 @@ void MainWindowTask::closeEvent(QCloseEvent *event)
saveBaseKurs();
}
;
qDebug()<<"CLOSE TASK WINDOW";
close();
};
......
......@@ -85,7 +85,7 @@ public slots:
protected:
void changeEvent(QEvent *e);
void closeEvent(QCloseEvent *event);
void showEvent(QShowEvent * event);
private:
bool checkInList(int id,QModelIndexList list);//Поиск id среди списка индексов
void enableMkSect(bool flag);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment