valentina/dialogs/dialogtool.h

89 lines
3.4 KiB
C
Raw Normal View History

2013-07-28 00:18:06 +02:00
#ifndef DIALOGTOOL_H
#define DIALOGTOOL_H
2013-08-20 12:26:02 +02:00
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
2013-08-20 12:26:02 +02:00
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
2013-07-28 00:18:06 +02:00
#include <QDialog>
#include <QComboBox>
#include <QSpinBox>
#include <QPushButton>
#include <QLineEdit>
#include <QListWidget>
#include <QLabel>
#include <QRadioButton>
#include <QTimer>
2013-08-20 12:26:02 +02:00
#pragma GCC diagnostic pop
2013-07-28 00:18:06 +02:00
#include "../container/vcontainer.h"
#include "../options.h"
class DialogTool : public QDialog
{
Q_OBJECT
public:
DialogTool(const VContainer *data, QWidget *parent = 0);
virtual ~DialogTool();
signals:
void DialogClosed(int result);
public slots:
2013-08-05 10:37:56 +02:00
virtual void ChoosedObject(qint64 id, Scene::Type type);
2013-07-28 00:18:06 +02:00
void NamePointChanged();
virtual void DialogAccepted();
virtual void DialogRejected();
void FormulaChanged();
void ArrowUp();
void ArrowDown();
void ArrowLeft();
void ArrowRight();
void ArrowLeftUp();
void ArrowLeftDown();
void ArrowRightUp();
void ArrowRightDown();
void EvalFormula();
void SizeGrowth();
void StandartTable();
void LengthLines();
void Increments();
void PutHere();
void PutVal(QListWidgetItem * item);
2013-08-06 09:56:09 +02:00
virtual void ValChenged(int row);
2013-07-28 00:18:06 +02:00
void UpdateList();
protected:
const VContainer *data;
bool isInitialized;
bool flagName;
bool flagFormula;
QTimer *timerFormula;
QPushButton *bOk;
QSpinBox *spinBoxAngle;
QLineEdit *lineEditFormula;
QListWidget *listWidget;
QLabel *labelResultCalculation;
QLabel *labelDescription;
QRadioButton *radioButtonSizeGrowth;
QRadioButton *radioButtonStandartTable;
QRadioButton *radioButtonIncrements;
QRadioButton *radioButtonLengthLine;
2013-08-15 22:39:00 +02:00
virtual void closeEvent ( QCloseEvent * event );
virtual void showEvent( QShowEvent *event );
void FillComboBoxPoints(QComboBox *box, const qint64 &id = 0)const;
2013-07-28 00:18:06 +02:00
void FillComboBoxTypeLine(QComboBox *box) const;
2013-07-31 13:34:39 +02:00
virtual void CheckState();
2013-07-28 00:18:06 +02:00
QString GetTypeLine(const QComboBox *box)const;
2013-08-06 09:56:09 +02:00
template <class key, class val> void ShowVariable(const QMap<key, val> *var);
2013-07-29 14:55:40 +02:00
void SetupTypeLine(QComboBox *box, const QString &value);
void ChangeCurrentText(QComboBox *box, const QString &value);
void ChangeCurrentData(QComboBox *box, const qint64 &value) const;
2013-08-06 09:56:09 +02:00
void PutValHere(QLineEdit *lineEdit, QListWidget *listWidget);
void ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer * timer);
void Eval(QLineEdit *edit, bool &flag, QTimer *timer, QLabel *label);
void setCurrentPointId(QComboBox *box, qint64 &pointId, const qint64 &value, const qint64 &id) const;
qint64 getCurrentPointId(QComboBox *box) const;
2013-08-20 12:26:02 +02:00
DialogTool(const DialogTool &dialog);
const DialogTool &operator=(const DialogTool &dialog);
2013-07-28 00:18:06 +02:00
};
#endif // DIALOGTOOL_H