2014-01-29 19:14:04 +00:00
|
|
|
/*
|
2020-06-15 17:42:37 +02:00
|
|
|
Copyright 2006-2020 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-08-29 15:37:42 +00:00
|
|
|
#include "formulaautonumberingw.h"
|
2014-07-31 10:02:33 +00:00
|
|
|
|
|
|
|
class NumPartEditorW;
|
|
|
|
class QAbstractButton;
|
2016-08-29 15:37:42 +00:00
|
|
|
class FormulaAutonumberingW;
|
2017-02-26 19:39:36 +00:00
|
|
|
class QComboBox;
|
2013-05-18 18:39:53 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class SelectAutonumW;
|
|
|
|
}
|
|
|
|
|
2020-08-28 18:32:24 +02:00
|
|
|
/**
|
|
|
|
@brief The SelectAutonumW class
|
|
|
|
*/
|
2013-05-18 18:39:53 +00:00
|
|
|
class SelectAutonumW : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
//METHODS
|
|
|
|
public:
|
2017-08-05 02:06:59 +00:00
|
|
|
explicit SelectAutonumW(int type, QWidget *parent = nullptr);
|
2020-08-28 18:32:24 +02:00
|
|
|
explicit SelectAutonumW(const NumerotationContext &context,
|
|
|
|
int type,
|
|
|
|
QWidget *parent = nullptr);
|
2017-08-05 02:10:01 +00:00
|
|
|
~SelectAutonumW() override;
|
2014-07-31 10:02:33 +00:00
|
|
|
|
|
|
|
void setContext (const NumerotationContext &context);
|
|
|
|
NumerotationContext toNumContext() const;
|
2016-07-10 01:33:49 +00:00
|
|
|
void contextToFormula ();
|
2016-08-29 15:37:42 +00:00
|
|
|
QString formula();
|
2017-02-26 19:39:36 +00:00
|
|
|
QComboBox *contextComboBox() const;
|
2014-07-31 10:02:33 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void applyPressed();
|
2017-02-26 19:39:36 +00:00
|
|
|
void removeClicked();
|
2013-05-18 18:39:53 +00:00
|
|
|
|
2017-02-26 19:39:36 +00:00
|
|
|
//SLOT
|
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);
|
2014-08-04 16:12:59 +00:00
|
|
|
void on_m_next_pb_clicked();
|
|
|
|
void on_m_previous_pb_clicked();
|
2017-02-26 19:39:36 +00:00
|
|
|
void on_m_comboBox_currentTextChanged(const QString &arg1);
|
|
|
|
|
|
|
|
//ATTRIBUTES
|
|
|
|
void on_m_remove_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-08-29 15:37:42 +00:00
|
|
|
FormulaAutonumberingW *m_feaw;
|
|
|
|
FormulaAutonumberingW *m_fcaw;
|
2020-08-28 18:32:24 +02:00
|
|
|
int m_edited_type = -1; ///<0 == element : 1 == conductor : 2 == folio
|
2013-05-18 18:39:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SELECTAUTONUMW_H
|