2014-01-29 19:14:04 +00:00
|
|
|
/*
|
2016-05-13 17:40:36 +00:00
|
|
|
Copyright 2006-2016 The QElectroTech Team
|
2014-01-29 19:14:04 +00:00
|
|
|
This file is part of QElectroTech.
|
|
|
|
|
|
|
|
QElectroTech 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 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
QElectroTech 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 QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2013-05-18 18:39:53 +00:00
|
|
|
#ifndef SELECTAUTONUMW_H
|
|
|
|
#define SELECTAUTONUMW_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
2014-07-31 10:02:33 +00:00
|
|
|
#include "numerotationcontext.h"
|
2016-07-10 01:33:49 +00:00
|
|
|
#include "elementautonumberingw.h"
|
2014-07-31 10:02:33 +00:00
|
|
|
|
|
|
|
class NumPartEditorW;
|
|
|
|
class QAbstractButton;
|
2013-05-18 18:39:53 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class SelectAutonumW;
|
|
|
|
}
|
|
|
|
|
|
|
|
class SelectAutonumW : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
//METHODS
|
|
|
|
public:
|
2014-07-31 10:02:33 +00:00
|
|
|
explicit SelectAutonumW(QWidget *parent = 0);
|
|
|
|
explicit SelectAutonumW(const NumerotationContext &context, QWidget *parent = 0);
|
|
|
|
~SelectAutonumW();
|
|
|
|
|
|
|
|
void setContext (const NumerotationContext &context);
|
|
|
|
NumerotationContext toNumContext() const;
|
2016-07-10 01:33:49 +00:00
|
|
|
void contextToFormula ();
|
|
|
|
QString elementFormula();
|
2014-07-31 10:02:33 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void applyPressed();
|
2013-05-18 18:39:53 +00:00
|
|
|
|
|
|
|
//SLOT
|
2016-07-14 17:16:14 +00:00
|
|
|
public slots:
|
|
|
|
void applyEnableOnContextChanged(QString);
|
|
|
|
|
2013-05-18 18:39:53 +00:00
|
|
|
private slots:
|
2014-07-31 10:02:33 +00:00
|
|
|
void on_add_button_clicked();
|
|
|
|
void on_remove_button_clicked();
|
|
|
|
void on_buttonBox_clicked(QAbstractButton *);
|
|
|
|
void applyEnable (bool = true);
|
2013-05-18 18:39:53 +00:00
|
|
|
|
2016-07-10 01:33:49 +00:00
|
|
|
//ATTRIBUTES
|
2014-08-04 16:12:59 +00:00
|
|
|
void on_m_next_pb_clicked();
|
|
|
|
void on_m_previous_pb_clicked();
|
|
|
|
|
2013-05-18 18:39:53 +00:00
|
|
|
private:
|
2014-07-31 10:02:33 +00:00
|
|
|
Ui::SelectAutonumW *ui;
|
|
|
|
QList <NumPartEditorW *> num_part_list_;
|
|
|
|
NumerotationContext m_context;
|
2016-07-10 01:33:49 +00:00
|
|
|
ElementAutonumberingW *m_eaw;
|
2013-05-18 18:39:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SELECTAUTONUMW_H
|