git-svn-id: svn://db.shs.com.ru/libs@386 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
#include "edockwidget.h"
|
||||
#include "cdpultwindow.h"
|
||||
#include "cdutils_k.h"
|
||||
#include "cdutils_core.h"
|
||||
#include "cdutils_k.h"
|
||||
#include "cdutils_x.h"
|
||||
#include "qcd_core.h"
|
||||
#include "qcd_view.h"
|
||||
#include "qcd_model.h"
|
||||
@@ -79,6 +80,7 @@ bool CDPultWindow::load(const QString & path) {
|
||||
checkHasK->setChecked(conf.getValue("has_k"));
|
||||
checkHasX->setChecked(conf.getValue("has_x"));
|
||||
checkHasC->setChecked(conf.getValue("has_c"));
|
||||
session_gr = conf.getValue("session_gr", QByteArray());
|
||||
setChanged(false);
|
||||
file_name = path;
|
||||
return true;
|
||||
@@ -86,6 +88,7 @@ bool CDPultWindow::load(const QString & path) {
|
||||
|
||||
|
||||
bool CDPultWindow::save(const QString & path) {
|
||||
session_gr = widgetGraphics->save();
|
||||
QPIConfig conf(path, QIODevice::ReadWrite);
|
||||
conf.clear();
|
||||
conf.setValue("file_k", editFileK->value().value<QAD::File>().file);
|
||||
@@ -96,6 +99,7 @@ bool CDPultWindow::save(const QString & path) {
|
||||
conf.setValue("has_k", checkHasK->isChecked());
|
||||
conf.setValue("has_x", checkHasX->isChecked());
|
||||
conf.setValue("has_c", checkHasC->isChecked());
|
||||
conf.setValue("session_gr", session_gr);
|
||||
file_name = path;
|
||||
return true;
|
||||
|
||||
@@ -156,6 +160,7 @@ void CDPultWindow::on_editFileK_valueChanged(const QVariant & p) {
|
||||
|
||||
|
||||
void CDPultWindow::on_buttonSessionApply_clicked() {
|
||||
// with session or not
|
||||
widgetK->setFile(editFileK->value().value<QAD::File>().file);
|
||||
widgetX->setFile(editFileX->value().value<QAD::File>().file);
|
||||
widgetC->setFile(editFileC->value().value<QAD::File>().file);
|
||||
@@ -163,6 +168,14 @@ void CDPultWindow::on_buttonSessionApply_clicked() {
|
||||
dockCDXView->setVisible(checkHasX->isChecked());
|
||||
dockCDCView->setVisible(checkHasC->isChecked());
|
||||
widgetX->view->startX();
|
||||
widgetGraphics->load(session_gr);
|
||||
X.lock();
|
||||
PIVector<PIDeque<int> > x_list = X.enabledList();
|
||||
X.unlock();
|
||||
piForeachC (PIDeque<int> & p, x_list)
|
||||
X.enable(X[p]);
|
||||
((CDItemModel*)widgetX->view->model())->updateModel();
|
||||
widgetX->view->expandAll();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user