mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 16:50:53 +01:00
Mod doc set style de same
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
#include "qetproject.h"
|
||||
#include "diagram.h"
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
Constructor
|
||||
*/
|
||||
FolioAutonumberingW::FolioAutonumberingW(QETProject *project, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
project_(project),
|
||||
@@ -39,56 +39,56 @@ FolioAutonumberingW::FolioAutonumberingW(QETProject *project, QWidget *parent) :
|
||||
}
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
Destructor
|
||||
*/
|
||||
FolioAutonumberingW::~FolioAutonumberingW()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FolioAutonumberingW::setContext
|
||||
* construct autonums in the comboBox selected in the @autonum_chooser QcomboBox
|
||||
*/
|
||||
@brief FolioAutonumberingW::setContext
|
||||
construct autonums in the comboBox selected in the @autonum_chooser QcomboBox
|
||||
*/
|
||||
void FolioAutonumberingW::setContext(QList <QString> autonums) {
|
||||
foreach (QString str, autonums) { ui->m_autonums_cb->addItem(str);}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FolioAutonumberingW::autoNumSelected
|
||||
* returns the current autonum selected
|
||||
*/
|
||||
@brief FolioAutonumberingW::autoNumSelected
|
||||
returns the current autonum selected
|
||||
*/
|
||||
QString FolioAutonumberingW::autoNumSelected(){
|
||||
return ui->m_autonums_cb->currentText();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FolioAutonumberingW::fromFolio
|
||||
* returns the current "From Folio" index
|
||||
*/
|
||||
@brief FolioAutonumberingW::fromFolio
|
||||
returns the current "From Folio" index
|
||||
*/
|
||||
int FolioAutonumberingW::fromFolio(){
|
||||
return ui->m_from_cb->currentIndex()-1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FolioAutonumberingW::toFolio
|
||||
* returns the current "To Folio" index
|
||||
*/
|
||||
@brief FolioAutonumberingW::toFolio
|
||||
returns the current "To Folio" index
|
||||
*/
|
||||
int FolioAutonumberingW::toFolio(){
|
||||
return ui->m_to_cb->currentIndex()+this->fromFolio()+1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FolioAutonumberingW::newFoliosNumber
|
||||
* returns the number of folios to create
|
||||
*/
|
||||
@brief FolioAutonumberingW::newFoliosNumber
|
||||
returns the number of folios to create
|
||||
*/
|
||||
int FolioAutonumberingW::newFoliosNumber(){
|
||||
return ui->m_new_tabs_sb->value();
|
||||
}
|
||||
/**
|
||||
* @brief FolioAutonumberingW::updateFolioList
|
||||
* update Folio List in From and To ComboBox
|
||||
*/
|
||||
@brief FolioAutonumberingW::updateFolioList
|
||||
update Folio List in From and To ComboBox
|
||||
*/
|
||||
void FolioAutonumberingW::updateFolioList(){
|
||||
ui -> m_from_cb->clear();
|
||||
ui -> m_to_cb->clear();
|
||||
@@ -100,9 +100,9 @@ void FolioAutonumberingW::updateFolioList(){
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FolioAutonumberingW::on_m_create_new_tabs_rb_clicked
|
||||
@brief FolioAutonumberingW::on_m_create_new_tabs_rb_clicked
|
||||
* Enable New Tabs SpinBox
|
||||
*/
|
||||
*/
|
||||
void FolioAutonumberingW::on_m_create_new_tabs_rb_clicked() {
|
||||
ui->m_from_cb->setEnabled(false);
|
||||
ui->m_to_cb->setEnabled(false);
|
||||
@@ -112,9 +112,9 @@ void FolioAutonumberingW::on_m_create_new_tabs_rb_clicked() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked
|
||||
@brief FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked
|
||||
* Enable From ComboBox, fill From ComboBox
|
||||
*/
|
||||
*/
|
||||
void FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked() {
|
||||
ui->m_new_tabs_sb->setEnabled(false);
|
||||
ui->m_from_cb->setEnabled(true);
|
||||
@@ -131,18 +131,18 @@ void FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FolioAutonumberingW::on_m_new_tabs_sb_valueChanged
|
||||
@brief FolioAutonumberingW::on_m_new_tabs_sb_valueChanged
|
||||
* Enable Apply if any new folio is to be created
|
||||
*/
|
||||
*/
|
||||
void FolioAutonumberingW::on_m_new_tabs_sb_valueChanged(int){
|
||||
if (ui->m_new_tabs_sb->value()>0) applyEnable(true);
|
||||
else applyEnable(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief FolioAutonumberingW::on_m_from_cb_currentIndexChanged
|
||||
@brief FolioAutonumberingW::on_m_from_cb_currentIndexChanged
|
||||
* Enable To ComboBox
|
||||
*/
|
||||
*/
|
||||
void FolioAutonumberingW::on_m_from_cb_currentIndexChanged(int){
|
||||
int index = ui->m_from_cb->currentIndex();
|
||||
ui->m_to_cb->clear();
|
||||
@@ -159,9 +159,9 @@ void FolioAutonumberingW::on_m_from_cb_currentIndexChanged(int){
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SelectAutonumW::on_buttonBox_clicked
|
||||
* Action on @buttonBox clicked
|
||||
*/
|
||||
@brief SelectAutonumW::on_buttonBox_clicked
|
||||
Action on @buttonBox clicked
|
||||
*/
|
||||
void FolioAutonumberingW::on_buttonBox_clicked(QAbstractButton *button) {
|
||||
//transform button to int
|
||||
int answer = ui -> buttonBox -> buttonRole(button);
|
||||
@@ -194,9 +194,9 @@ void FolioAutonumberingW::on_buttonBox_clicked(QAbstractButton *button) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SelectAutonumW::applyEnable
|
||||
* enable/disable the apply button
|
||||
*/
|
||||
@brief SelectAutonumW::applyEnable
|
||||
enable/disable the apply button
|
||||
*/
|
||||
void FolioAutonumberingW::applyEnable(bool b) {
|
||||
if (b){
|
||||
bool valid = true;
|
||||
|
||||
Reference in New Issue
Block a user