git-svn-id: svn://db.shs.com.ru/libs@279 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -16,7 +16,7 @@ MainWindow::MainWindow(QWidget * parent): QMainWindow(parent), Ui::MainWindow()
|
||||
epal.setColor(lineInput->backgroundRole(), QColor(Qt::red).lighter(150));
|
||||
connect(&session, SIGNAL(loading(QPIConfig & )), this, SLOT(loading(QPIConfig & )));
|
||||
connect(&session, SIGNAL(saving(QPIConfig & )), this, SLOT(saving(QPIConfig & )));
|
||||
session.setFile("session.conf");
|
||||
session.setFile("session_qpicalc.conf");
|
||||
session.addEntry(this);
|
||||
session.addEntry(lineInput);
|
||||
session.addEntry(tabWidget);
|
||||
@@ -105,6 +105,9 @@ void MainWindow::loading(QPIConfig & conf) {
|
||||
}
|
||||
buttonGraphicClear->setEnabled(treeGraphics->topLevelItemCount() > 0);
|
||||
graphic->setVisualRect(conf.getValue("graphicRect", QRectF(-1., -1., 2., 2.)));
|
||||
ba = conf.getValue("graphic_state", QByteArray());
|
||||
if (!ba.isEmpty())
|
||||
graphic->load(ba);
|
||||
on_tabWidget_currentChanged(0);
|
||||
redrawGraphics();
|
||||
active_ = true;
|
||||
@@ -130,6 +133,7 @@ void MainWindow::saving(QPIConfig & conf) {
|
||||
s << graphic->allGraphics();
|
||||
conf.setValue("graphics", QByteArray2QString(ba));
|
||||
conf.setValue("graphicRect", graphic->visualRect());
|
||||
conf.setValue("graphic_state", graphic->save());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>780</width>
|
||||
<height>492</height>
|
||||
<height>521</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -22,7 +22,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@@ -32,7 +32,16 @@
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -120,7 +129,16 @@
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -166,7 +184,7 @@
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonVarAdd">
|
||||
<property name="icon">
|
||||
<iconset resource="qpicalculator.qrc">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -183,7 +201,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="qpicalculator.qrc">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -219,7 +237,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="qpicalculator.qrc">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -255,7 +273,16 @@
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -313,7 +340,7 @@
|
||||
<item>
|
||||
<widget class="QToolButton" name="buttonGraphicAdd">
|
||||
<property name="icon">
|
||||
<iconset resource="qpicalculator.qrc">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/list-add.png</normaloff>:/icons/list-add.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -330,7 +357,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="qpicalculator.qrc">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-delete.png</normaloff>:/icons/edit-delete.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -366,7 +393,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="qpicalculator.qrc">
|
||||
<iconset resource="../../utils/qad_utils.qrc">
|
||||
<normaloff>:/icons/edit-clear.png</normaloff>:/icons/edit-clear.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
@@ -402,7 +429,7 @@
|
||||
<item>
|
||||
<widget class="Graphic" name="graphic">
|
||||
<property name="buttons">
|
||||
<set>Graphic::BorderInputs|Graphic::Configure|Graphic::CursorAxis|Graphic::Grid|Graphic::Save</set>
|
||||
<set>Graphic::BorderInputs|Graphic::Configure|Graphic::CursorAxis|Graphic::Fullscreen|Graphic::Grid|Graphic::Save</set>
|
||||
</property>
|
||||
<property name="antialiasing">
|
||||
<bool>true</bool>
|
||||
@@ -436,6 +463,7 @@
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../utils/qad_utils.qrc"/>
|
||||
<include location="qpicalculator.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
|
||||
Reference in New Issue
Block a user