git-svn-id: svn://db.shs.com.ru/libs@357 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-02-13 13:59:11 +00:00
parent a9a05517a9
commit 540b358a08
26 changed files with 218 additions and 260 deletions

View File

@@ -25,8 +25,23 @@ public:
bool isClearButtonVisible() const {return cw_visible;}
bool isCleared() const;
virtual void stepBy(int steps);
virtual void clear();
virtual QSize sizeHint() const;
public slots:
void setExpression(const QString & expr);
void setValue(double val);
void setDefaultText(const QString & t);
void setClearButtonVisible(bool visible);
protected:
QString text() const {return QAbstractSpinBox::text();}
virtual StepEnabled stepEnabled() const;
virtual void focusInEvent(QFocusEvent *event);
virtual void focusOutEvent(QFocusEvent *event);
QWidget * status;
QWidget * cw;
QPIEvaluator eval;
@@ -38,7 +53,7 @@ protected:
QImage clear_im;
QString dt;
bool cw_visible;
private:
bool eventFilter(QObject * o, QEvent * e);
void resizeEvent(QResizeEvent * );
@@ -46,32 +61,16 @@ private:
void statusPaintEvent();
void cwPaintEvent();
void resizeIcons();
private slots:
void clearMouseRelease(QMouseEvent * e);
void textChanged_(const QString & text);
void setExpression_();
public slots:
void setExpression(const QString & expr);
void setValue(double val);
void setDefaultText(const QString & t);
void setClearButtonVisible(bool visible);
public:
virtual void stepBy(int steps);
virtual void clear();
virtual QSize sizeHint() const;
protected:
virtual StepEnabled stepEnabled() const;
virtual void focusInEvent(QFocusEvent *event);
virtual void focusOutEvent(QFocusEvent *event);
signals:
void valueChanged(double val);
void cleared();
};
#endif // EVALSPINBOX_H

View File

@@ -1,21 +1,3 @@
/*
Peri4 Paint
Copyright (C) 2018 Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "session_manager.h"

View File

@@ -1,21 +1,3 @@
/*
Peri4 Paint
Copyright (C) 2018 Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SESSION_MANAGER_H
#define SESSION_MANAGER_H
@@ -39,7 +21,7 @@ public:
~SessionManager() {;}
inline void setFile(const QString & file) {file_ = file;}
inline void addEntry(QMainWindow * e) {mwindows.push_back(QPair<QString, QMainWindow * >(e->objectName(), e));}
inline void addEntry(QCheckBox * e) {checks.push_back(QPair<QString, QCheckBox * >(e->objectName(), e));}
inline void addEntry(QLineEdit * e) {lines.push_back(QPair<QString, QLineEdit * >(e->objectName(), e));}
@@ -50,7 +32,7 @@ public:
inline void addEntry(QTabWidget * e) {tabs.push_back(QPair<QString, QTabWidget * >(e->objectName(), e));}
inline void addEntry(QAction * e) {actions.push_back(QPair<QString, QAction * >(e->objectName(), e));}
inline void addMainWidget(QWidget * e) {widgets.push_back(QPair<QString, QWidget * >(e->objectName(), e));}
inline void addEntry(const QString & name, QMainWindow * e) {mwindows.push_back(QPair<QString, QMainWindow * >(name, e));}
inline void addEntry(const QString & name, QCheckBox * e) {checks.push_back(QPair<QString, QCheckBox * >(name, e));}
inline void addEntry(const QString & name, QLineEdit * e) {lines.push_back(QPair<QString, QLineEdit * >(name, e));}