git-svn-id: svn://db.shs.com.ru/libs@462 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -38,7 +38,7 @@ EComboBox::EComboBox(QWidget * parent): QComboBox(parent) {
|
||||
iv.setMinimumHeight(100);
|
||||
icon.setPixmap(QPixmap(":/icons/edit-find.png"));
|
||||
icon.setScaledContents(true);
|
||||
icon.setFixedSize(preferredIconSize(1.2));
|
||||
icon.setFixedSize(preferredIconSize(1.2, this));
|
||||
ifont = nfont = font();
|
||||
ifont.setItalic(true);
|
||||
#if QT_VERSION >= 0x040700
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
explicit IconedLabel(QWidget * parent = 0): QFrame(parent) {
|
||||
label_.setAlignment(Qt::AlignCenter);
|
||||
icon_.setAlignment(Qt::AlignCenter);
|
||||
size_ = preferredIconSize();
|
||||
size_ = preferredIconSize(-1, this);
|
||||
setDirection(LeftToRight);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,6 +58,8 @@ void SessionManager::save() {
|
||||
sr.setValue(spins[i].first, spins[i].second->value(), false);
|
||||
for (int i = 0; i < spinsliders.size(); ++i)
|
||||
sr.setValue(spinsliders[i].first, spinsliders[i].second->value(), false);
|
||||
for (int i = 0; i < evals.size(); ++i)
|
||||
sr.setValue(evals[i].first, evals[i].second->expression(), false);
|
||||
for (int i = 0; i < tabs.size(); ++i)
|
||||
sr.setValue(tabs[i].first, tabs[i].second->currentIndex(), false);
|
||||
for (int i = 0; i < buttons.size(); ++i)
|
||||
@@ -134,6 +136,8 @@ void SessionManager::load(bool onlyMainwindow) {
|
||||
spins[i].second->setValue(sr.getValue(spins[i].first, spins[i].second->value()));
|
||||
for (int i = 0; i < spinsliders.size(); ++i)
|
||||
spinsliders[i].second->setValue(sr.getValue(spinsliders[i].first, spinsliders[i].second->value()));
|
||||
for (int i = 0; i < evals.size(); ++i)
|
||||
evals[i].second->setExpression(sr.getValue(evals[i].first, evals[i].second->expression()));
|
||||
for (int i = 0; i < tabs.size(); ++i) {
|
||||
QTabWidget * t = tabs[i].second;
|
||||
int v = sr.getValue(tabs[i].first, t->currentIndex());
|
||||
@@ -185,6 +189,7 @@ void SessionManager::clear(bool with_filename) {
|
||||
dspins.clear();
|
||||
spins.clear();
|
||||
spinsliders.clear();
|
||||
evals.clear();
|
||||
tabs.clear();
|
||||
buttons.clear();
|
||||
stacks.clear();
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <QSplitter>
|
||||
#include <QStackedWidget>
|
||||
#include "spinslider.h"
|
||||
#include "evalspinbox.h"
|
||||
#include "qpiconfig.h"
|
||||
|
||||
/// for all children widgets of "QMainWindow"s and MainWidgets
|
||||
@@ -37,6 +38,7 @@ public:
|
||||
void addEntry(QDoubleSpinBox * e) {dspins.push_back(QPair<QString, QDoubleSpinBox * >(e->objectName(), e));}
|
||||
void addEntry(QSpinBox * e) {spins.push_back(QPair<QString, QSpinBox * >(e->objectName(), e));}
|
||||
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(QAction * e) {actions.push_back(QPair<QString, QAction * >(e->objectName(), e));}
|
||||
void addEntry(QAbstractButton * e) {buttons.push_back(QPair<QString, QAbstractButton * >(e->objectName(), e));}
|
||||
@@ -51,6 +53,7 @@ public:
|
||||
void addEntry(const QString & name, QDoubleSpinBox * e) {dspins.push_back(QPair<QString, QDoubleSpinBox * >(name, e));}
|
||||
void addEntry(const QString & name, QSpinBox * e) {spins.push_back(QPair<QString, QSpinBox * >(name, e));}
|
||||
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, 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));}
|
||||
@@ -78,6 +81,7 @@ private:
|
||||
QVector<QPair<QString, QDoubleSpinBox * > > dspins;
|
||||
QVector<QPair<QString, QSpinBox * > > spins;
|
||||
QVector<QPair<QString, SpinSlider * > > spinsliders;
|
||||
QVector<QPair<QString, EvalSpinBox * > > evals;
|
||||
QVector<QPair<QString, QTabWidget * > > tabs;
|
||||
QVector<QPair<QString, QAbstractButton * > > buttons;
|
||||
QVector<QPair<QString, QStackedWidget * > > stacks;
|
||||
|
||||
Reference in New Issue
Block a user