2016-05-13 15:00:22 +00:00
|
|
|
/*
|
2025-01-04 13:37:40 +01:00
|
|
|
Copyright 2006-2025 The QElectroTech Team
|
2016-05-13 15:00:22 +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/>.
|
|
|
|
*/
|
|
|
|
#ifndef FOLIOAUTONUMBERING_H
|
|
|
|
#define FOLIOAUTONUMBERING_H
|
|
|
|
|
2020-12-08 19:57:35 +01:00
|
|
|
#include "../numerotationcontext.h"
|
|
|
|
|
2016-05-13 15:00:22 +00:00
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class NumPartEditorW;
|
|
|
|
class QAbstractButton;
|
|
|
|
class QETProject;
|
|
|
|
|
|
|
|
namespace Ui {
|
2016-07-05 20:14:14 +00:00
|
|
|
class FolioAutonumberingW;
|
2016-05-13 15:00:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class FolioAutonumberingW : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
//METHODS
|
|
|
|
public:
|
2017-08-05 02:06:59 +00:00
|
|
|
explicit FolioAutonumberingW(QETProject *project, QWidget *parent = nullptr);
|
2017-08-05 02:10:01 +00:00
|
|
|
~FolioAutonumberingW() override;
|
2016-05-13 15:00:22 +00:00
|
|
|
|
2016-07-05 20:14:14 +00:00
|
|
|
void setContext (QList <QString> autonums);
|
2016-05-13 15:00:22 +00:00
|
|
|
NumerotationContext toNumContext() const;
|
2016-07-05 20:14:14 +00:00
|
|
|
QString autoNumSelected();
|
|
|
|
int newFoliosNumber();
|
|
|
|
bool newFolios;
|
|
|
|
int fromFolio();
|
|
|
|
int toFolio();
|
2016-05-13 15:00:22 +00:00
|
|
|
|
|
|
|
// SIGNALS
|
|
|
|
signals:
|
|
|
|
void applyPressed();
|
|
|
|
void m_autonumber_tabs_rb_clicked();
|
|
|
|
|
|
|
|
//SLOTS
|
|
|
|
private slots:
|
2016-07-05 20:14:14 +00:00
|
|
|
void on_m_create_new_tabs_rb_clicked();
|
|
|
|
void on_m_autonumber_tabs_rb_clicked();
|
|
|
|
void on_m_new_tabs_sb_valueChanged(int);
|
2016-05-13 15:00:22 +00:00
|
|
|
void on_buttonBox_clicked(QAbstractButton *);
|
2016-07-05 20:14:14 +00:00
|
|
|
void on_m_from_cb_currentIndexChanged(int);
|
2016-05-13 15:00:22 +00:00
|
|
|
void applyEnable (bool = true);
|
|
|
|
|
|
|
|
//ATTRIBUTES
|
|
|
|
private:
|
2016-07-05 20:14:14 +00:00
|
|
|
QETProject *project_;
|
|
|
|
Ui::FolioAutonumberingW *ui;
|
2016-05-13 15:00:22 +00:00
|
|
|
QList <NumPartEditorW *> num_part_list_;
|
|
|
|
NumerotationContext m_context;
|
2020-07-15 17:43:20 +02:00
|
|
|
void updateFolioList();
|
2016-05-13 15:00:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FOLIOAUTONUMBERING_H
|