git-svn-id: svn://db.shs.com.ru/libs@612 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -29,6 +29,8 @@ namespace Ui {
|
||||
|
||||
class UGLWidget;
|
||||
|
||||
Q_DECLARE_METATYPE(QVector<QPointF>)
|
||||
|
||||
class Graphic: public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -443,6 +445,7 @@ inline QDataStream & operator >>(QDataStream & s, Graphic::Graduation & v) {s >>
|
||||
class __GraphicRegistrator__ {
|
||||
public:
|
||||
__GraphicRegistrator__() {
|
||||
qRegisterMetaType<QVector<QPointF> >("QVector<QPointF>");
|
||||
qRegisterMetaType<Graphic::GraphicsData>("Graphic::GraphicsData");
|
||||
qRegisterMetaTypeStreamOperators<Graphic::GraphicsData>("Graphic::GraphicsData");
|
||||
}
|
||||
|
||||
@@ -347,6 +347,7 @@ bool QCodeEdit::eventFilter(QObject * o, QEvent * e) {
|
||||
pos_press = tc.anchor();
|
||||
if (!tc.movePosition(QTextCursor::Down, QTextCursor::KeepAnchor))
|
||||
tc.movePosition(QTextCursor::EndOfLine, QTextCursor::KeepAnchor);
|
||||
ui->textCode->setFocus();
|
||||
ui->textCode->setTextCursor(tc);
|
||||
return true;
|
||||
case QEvent::MouseMove:
|
||||
|
||||
@@ -67,6 +67,8 @@ void SessionManager::save() {
|
||||
sr.setValue(evals[i].first, evals[i].second->expression(), "s", false);
|
||||
for (int i = 0; i < tabs.size(); ++i)
|
||||
sr.setValue(tabs[i].first, tabs[i].second->currentIndex(), false);
|
||||
for (int i = 0; i < groups.size(); ++i)
|
||||
sr.setValue(groups[i].first, groups[i].second->isChecked(), false);
|
||||
for (int i = 0; i < buttons.size(); ++i)
|
||||
sr.setValue(buttons[i].first, buttons[i].second->isChecked(), false);
|
||||
for (int i = 0; i < stacks.size(); ++i)
|
||||
@@ -195,6 +197,8 @@ void SessionManager::load(bool onlyMainwindow) {
|
||||
if (v >= 0 && v < t->count())
|
||||
t->setCurrentIndex(v);
|
||||
}
|
||||
for (int i = 0; i < groups.size(); ++i)
|
||||
groups[i].second->setChecked(sr.getValue(groups[i].first, groups[i].second->isChecked()));
|
||||
for (int i = 0; i < buttons.size(); ++i)
|
||||
buttons[i].second->setChecked(sr.getValue(buttons[i].first, buttons[i].second->isChecked()));
|
||||
for (int i = 0; i < stacks.size(); ++i)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <QToolButton>
|
||||
#include <QSplitter>
|
||||
#include <QStackedWidget>
|
||||
#include <QGroupBox>
|
||||
#include "spinslider.h"
|
||||
#include "evalspinbox.h"
|
||||
#include "qpiconfig.h"
|
||||
@@ -40,6 +41,7 @@ public:
|
||||
void addEntry(SpinSlider * e) {spinsliders.push_back(QPair<QString, SpinSlider * >(e->objectName(), e));}
|
||||
void addEntry(EvalSpinBox * e) {evals.push_back(QPair<QString, EvalSpinBox * >(e->objectName(), e));}
|
||||
void addEntry(QTabWidget * e) {tabs.push_back(QPair<QString, QTabWidget * >(e->objectName(), e));}
|
||||
void addEntry(QGroupBox * e) {groups.push_back(QPair<QString, QGroupBox * >(e->objectName(), e));}
|
||||
void addEntry(QAction * e) {actions.push_back(QPair<QString, QAction * >(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));}
|
||||
@@ -55,6 +57,7 @@ public:
|
||||
void addEntry(const QString & name, SpinSlider * e) {spinsliders.push_back(QPair<QString, SpinSlider * >(name, e));}
|
||||
void addEntry(const QString & name, EvalSpinBox * e) {evals.push_back(QPair<QString, EvalSpinBox * >(name, e));}
|
||||
void addEntry(const QString & name, QTabWidget * e) {tabs.push_back(QPair<QString, QTabWidget * >(name, e));}
|
||||
void addEntry(const QString & name, QGroupBox * e) {groups.push_back(QPair<QString, QGroupBox * >(name, e));}
|
||||
void addEntry(const QString & name, QAbstractButton * e) {buttons.push_back(QPair<QString, QAbstractButton * >(name, e));}
|
||||
void addEntry(const QString & name, QStackedWidget * e) {stacks.push_back(QPair<QString, QStackedWidget * >(name, e));}
|
||||
void addEntry(const QString & name, QAction * e) {actions.push_back(QPair<QString, QAction * >(name, e));}
|
||||
@@ -79,6 +82,7 @@ private:
|
||||
QVector<QPair<QString, SpinSlider * > > spinsliders;
|
||||
QVector<QPair<QString, EvalSpinBox * > > evals;
|
||||
QVector<QPair<QString, QTabWidget * > > tabs;
|
||||
QVector<QPair<QString, QGroupBox * > > groups;
|
||||
QVector<QPair<QString, QAbstractButton * > > buttons;
|
||||
QVector<QPair<QString, QStackedWidget * > > stacks;
|
||||
QVector<QPair<QString, QAction * > > actions;
|
||||
|
||||
Reference in New Issue
Block a user