mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-05 03:59:59 +01:00
Wrap code for better readability
This commit is contained in:
@@ -47,10 +47,11 @@ class AboutQETDialog : public QDialog
|
||||
void setLibraries();
|
||||
void setLicence();
|
||||
void setLoginfo();
|
||||
void addAuthor(QLabel *label,
|
||||
const QString &name,
|
||||
const QString &email,
|
||||
const QString &work);
|
||||
void addAuthor(
|
||||
QLabel *label,
|
||||
const QString &name,
|
||||
const QString &email,
|
||||
const QString &work);
|
||||
void addLibrary(QLabel *label,
|
||||
const QString &name,
|
||||
const QString &link);
|
||||
|
||||
@@ -47,7 +47,8 @@ BorderPropertiesWidget::~BorderPropertiesWidget()
|
||||
Set the current properties to edit
|
||||
@param bp properties to edit
|
||||
*/
|
||||
void BorderPropertiesWidget::setProperties(const BorderProperties &bp) {
|
||||
void BorderPropertiesWidget::setProperties(const BorderProperties &bp)
|
||||
{
|
||||
m_properties = bp;
|
||||
ui -> m_colums_count_sp ->setValue (m_properties.columns_count);
|
||||
ui -> m_columns_width_sp ->setValue (m_properties.columns_width);
|
||||
@@ -61,7 +62,8 @@ void BorderPropertiesWidget::setProperties(const BorderProperties &bp) {
|
||||
@brief BorderPropertiesWidget::properties
|
||||
@return the edited border properties
|
||||
*/
|
||||
const BorderProperties &BorderPropertiesWidget::properties () {
|
||||
const BorderProperties &BorderPropertiesWidget::properties ()
|
||||
{
|
||||
m_properties.columns_count = ui -> m_colums_count_sp -> value();
|
||||
m_properties.columns_width = ui -> m_columns_width_sp -> value();
|
||||
m_properties.display_columns = ui -> m_display_columns_cb -> isChecked();
|
||||
@@ -76,6 +78,7 @@ const BorderProperties &BorderPropertiesWidget::properties () {
|
||||
Enable or disable this widget
|
||||
@param ro true-disable / false-enable
|
||||
*/
|
||||
void BorderPropertiesWidget::setReadOnly(const bool &ro) {
|
||||
void BorderPropertiesWidget::setReadOnly(const bool &ro)
|
||||
{
|
||||
ui->border_gb->setDisabled(ro);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ CompositeTextEditDialog::CompositeTextEditDialog(QString text, QWidget *parent)
|
||||
setUpComboBox();
|
||||
}
|
||||
|
||||
CompositeTextEditDialog::~CompositeTextEditDialog() {
|
||||
CompositeTextEditDialog::~CompositeTextEditDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -38,7 +39,8 @@ CompositeTextEditDialog::~CompositeTextEditDialog() {
|
||||
@brief CompositeTextEditDialog::plainText
|
||||
@return The edited text
|
||||
*/
|
||||
QString CompositeTextEditDialog::plainText() const {
|
||||
QString CompositeTextEditDialog::plainText() const
|
||||
{
|
||||
return ui->m_plain_text_edit->toPlainText();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
@param conductor : conductor to edit propertie
|
||||
@param parent : parent widget
|
||||
*/
|
||||
ConductorPropertiesDialog::ConductorPropertiesDialog(Conductor *conductor,
|
||||
QWidget *parent) :
|
||||
ConductorPropertiesDialog::ConductorPropertiesDialog(
|
||||
Conductor *conductor, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ConductorPropertiesDialog)
|
||||
{
|
||||
@@ -92,7 +92,8 @@ void ConductorPropertiesDialog::PropertiesDialog(Conductor *conductor,
|
||||
@brief ConductorPropertiesDialog::properties
|
||||
@return the edited properties
|
||||
*/
|
||||
ConductorProperties ConductorPropertiesDialog::properties() const {
|
||||
ConductorProperties ConductorPropertiesDialog::properties() const
|
||||
{
|
||||
return m_cpw -> properties();
|
||||
}
|
||||
|
||||
@@ -102,6 +103,7 @@ ConductorProperties ConductorPropertiesDialog::properties() const {
|
||||
true -> must apply the propertie to all conductor at the same potential
|
||||
false -> must apply properties only for the edited conductor
|
||||
*/
|
||||
bool ConductorPropertiesDialog::applyAll() const {
|
||||
bool ConductorPropertiesDialog::applyAll() const
|
||||
{
|
||||
return ui -> m_apply_all_cb -> isChecked();
|
||||
}
|
||||
|
||||
@@ -34,10 +34,10 @@ class ConductorPropertiesDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConductorPropertiesDialog (Conductor *conductor,
|
||||
QWidget *parent = nullptr);
|
||||
static void PropertiesDialog (Conductor *conductor,
|
||||
QWidget *parent = nullptr);
|
||||
explicit ConductorPropertiesDialog (
|
||||
Conductor *conductor, QWidget *parent = nullptr);
|
||||
static void PropertiesDialog (
|
||||
Conductor *conductor, QWidget *parent = nullptr);
|
||||
~ConductorPropertiesDialog() override;
|
||||
|
||||
ConductorProperties properties() const;
|
||||
|
||||
@@ -219,7 +219,8 @@ QPushButton *ConductorPropertiesWidget::editAutonumPushButton() const
|
||||
/**
|
||||
@brief ConductorPropertiesWidget::initWidget
|
||||
*/
|
||||
void ConductorPropertiesWidget::initWidget() {
|
||||
void ConductorPropertiesWidget::initWidget()
|
||||
{
|
||||
m_verti_select = QETApp::createTextOrientationSpinBoxWidget();
|
||||
ui -> m_text_angle_gl -> addWidget(m_verti_select, 2, 0, Qt::AlignHCenter);
|
||||
m_horiz_select = QETApp::createTextOrientationSpinBoxWidget();
|
||||
@@ -308,6 +309,7 @@ void ConductorPropertiesWidget::on_m_neutral_cb_toggled(bool checked) {
|
||||
to centralize signal from various widget to edit single ligne properties,
|
||||
for update the preview
|
||||
*/
|
||||
void ConductorPropertiesWidget::on_m_update_preview_pb_clicked() {
|
||||
void ConductorPropertiesWidget::on_m_update_preview_pb_clicked()
|
||||
{
|
||||
updatePreview();
|
||||
}
|
||||
|
||||
@@ -234,7 +234,8 @@ void GeneralConfigurationPage::applyConf()
|
||||
@brief GeneralConfigurationPage::title
|
||||
@return The title of this page
|
||||
*/
|
||||
QString GeneralConfigurationPage::title() const {
|
||||
QString GeneralConfigurationPage::title() const
|
||||
{
|
||||
return(tr("Général", "configuration page title"));
|
||||
}
|
||||
|
||||
@@ -242,7 +243,8 @@ QString GeneralConfigurationPage::title() const {
|
||||
@brief GeneralConfigurationPage::icon
|
||||
@return The icon of this page
|
||||
*/
|
||||
QIcon GeneralConfigurationPage::icon() const {
|
||||
QIcon GeneralConfigurationPage::icon() const
|
||||
{
|
||||
return(QET::Icons::Settings);
|
||||
}
|
||||
|
||||
@@ -252,33 +254,33 @@ QIcon GeneralConfigurationPage::icon() const {
|
||||
*/
|
||||
void GeneralConfigurationPage::fillLang()
|
||||
{
|
||||
ui->m_lang_cb->addItem(QET::Icons::translation, tr("Système"), "system");
|
||||
ui->m_lang_cb->addItem(QET::Icons::translation, tr("Système"), "system");
|
||||
ui->m_lang_cb->insertSeparator(1);
|
||||
|
||||
// all lang available on lang directory
|
||||
ui->m_lang_cb->addItem(QET::Icons::ar, tr("Arabe"), "ar");
|
||||
ui->m_lang_cb->addItem(QET::Icons::br, tr("Brézilien"), "pt_br");
|
||||
ui->m_lang_cb->addItem(QET::Icons::catalonia, tr("Catalan"), "ca");
|
||||
ui->m_lang_cb->addItem(QET::Icons::cs, tr("Tchèque"), "cs");
|
||||
ui->m_lang_cb->addItem(QET::Icons::de, tr("Allemand"), "de");
|
||||
ui->m_lang_cb->addItem(QET::Icons::da, tr("Danois"), "da");
|
||||
ui->m_lang_cb->addItem(QET::Icons::gr, tr("Grec"), "el");
|
||||
ui->m_lang_cb->addItem(QET::Icons::en, tr("Anglais"), "en");
|
||||
ui->m_lang_cb->addItem(QET::Icons::es, tr("Espagnol"), "es");
|
||||
ui->m_lang_cb->addItem(QET::Icons::fr, tr("Français"), "fr");
|
||||
ui->m_lang_cb->addItem(QET::Icons::hr, tr("Croate"), "hr");
|
||||
ui->m_lang_cb->addItem(QET::Icons::it, tr("Italien"), "it");
|
||||
ui->m_lang_cb->addItem(QET::Icons::jp, tr("Japonais"), "ja");
|
||||
ui->m_lang_cb->addItem(QET::Icons::pl, tr("Polonais"), "pl");
|
||||
ui->m_lang_cb->addItem(QET::Icons::pt, tr("Portugais"), "pt");
|
||||
ui->m_lang_cb->addItem(QET::Icons::ro, tr("Roumains"), "ro");
|
||||
ui->m_lang_cb->addItem(QET::Icons::ru, tr("Russe"), "ru");
|
||||
ui->m_lang_cb->addItem(QET::Icons::sl, tr("Slovène"), "sl");
|
||||
ui->m_lang_cb->addItem(QET::Icons::nl, tr("Pays-Bas"), "nl");
|
||||
ui->m_lang_cb->addItem(QET::Icons::no, tr("Norvege"), "nb");
|
||||
ui->m_lang_cb->addItem(QET::Icons::be, tr("Belgique-Flemish"), "be");
|
||||
ui->m_lang_cb->addItem(QET::Icons::tr, tr("Turc"), "tr");
|
||||
ui->m_lang_cb->addItem(QET::Icons::hu, tr("Hongrois"), "hu");
|
||||
ui->m_lang_cb->addItem(QET::Icons::ar, tr("Arabe"), "ar");
|
||||
ui->m_lang_cb->addItem(QET::Icons::br, tr("Brézilien"), "pt_br");
|
||||
ui->m_lang_cb->addItem(QET::Icons::catalonia, tr("Catalan"), "ca");
|
||||
ui->m_lang_cb->addItem(QET::Icons::cs, tr("Tchèque"), "cs");
|
||||
ui->m_lang_cb->addItem(QET::Icons::de, tr("Allemand"), "de");
|
||||
ui->m_lang_cb->addItem(QET::Icons::da, tr("Danois"), "da");
|
||||
ui->m_lang_cb->addItem(QET::Icons::gr, tr("Grec"), "el");
|
||||
ui->m_lang_cb->addItem(QET::Icons::en, tr("Anglais"), "en");
|
||||
ui->m_lang_cb->addItem(QET::Icons::es, tr("Espagnol"), "es");
|
||||
ui->m_lang_cb->addItem(QET::Icons::fr, tr("Français"), "fr");
|
||||
ui->m_lang_cb->addItem(QET::Icons::hr, tr("Croate"), "hr");
|
||||
ui->m_lang_cb->addItem(QET::Icons::it, tr("Italien"), "it");
|
||||
ui->m_lang_cb->addItem(QET::Icons::jp, tr("Japonais"), "ja");
|
||||
ui->m_lang_cb->addItem(QET::Icons::pl, tr("Polonais"), "pl");
|
||||
ui->m_lang_cb->addItem(QET::Icons::pt, tr("Portugais"), "pt");
|
||||
ui->m_lang_cb->addItem(QET::Icons::ro, tr("Roumains"), "ro");
|
||||
ui->m_lang_cb->addItem(QET::Icons::ru, tr("Russe"), "ru");
|
||||
ui->m_lang_cb->addItem(QET::Icons::sl, tr("Slovène"), "sl");
|
||||
ui->m_lang_cb->addItem(QET::Icons::nl, tr("Pays-Bas"), "nl");
|
||||
ui->m_lang_cb->addItem(QET::Icons::no, tr("Norvege"), "nb");
|
||||
ui->m_lang_cb->addItem(QET::Icons::be, tr("Belgique-Flemish"), "be");
|
||||
ui->m_lang_cb->addItem(QET::Icons::tr, tr("Turc"), "tr");
|
||||
ui->m_lang_cb->addItem(QET::Icons::hu, tr("Hongrois"), "hu");
|
||||
|
||||
//set current index to the lang found in setting file
|
||||
//if lang doesn't exist set to system
|
||||
|
||||
@@ -30,11 +30,13 @@ ConfigSaveLoaderWidget::~ConfigSaveLoaderWidget()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QString ConfigSaveLoaderWidget::selectedText() const {
|
||||
QString ConfigSaveLoaderWidget::selectedText() const
|
||||
{
|
||||
return ui->m_combo_box->currentText();
|
||||
}
|
||||
|
||||
QString ConfigSaveLoaderWidget::text() const {
|
||||
QString ConfigSaveLoaderWidget::text() const
|
||||
{
|
||||
return ui->m_line_edit->text();
|
||||
}
|
||||
|
||||
@@ -42,10 +44,12 @@ void ConfigSaveLoaderWidget::addItem(QString text) {
|
||||
ui->m_combo_box->addItem(text);
|
||||
}
|
||||
|
||||
void ConfigSaveLoaderWidget::on_m_load_pb_clicked() {
|
||||
void ConfigSaveLoaderWidget::on_m_load_pb_clicked()
|
||||
{
|
||||
emit loadClicked();
|
||||
}
|
||||
|
||||
void ConfigSaveLoaderWidget::on_m_save_pb_clicked() {
|
||||
void ConfigSaveLoaderWidget::on_m_save_pb_clicked()
|
||||
{
|
||||
emit saveClicked();
|
||||
}
|
||||
|
||||
@@ -147,7 +147,8 @@ void DiagramPropertiesDialog::editAutonum()
|
||||
@brief DiagramPropertiesDialog::editAutonum
|
||||
Open folio autonum editor
|
||||
*/
|
||||
void DiagramPropertiesDialog::editAutoFolioNum () {
|
||||
void DiagramPropertiesDialog::editAutoFolioNum ()
|
||||
{
|
||||
ProjectPropertiesDialog ppd (m_diagram->project(), this);
|
||||
ppd.setCurrentPage(ProjectPropertiesDialog::Autonum);
|
||||
ppd.changeToFolio();
|
||||
|
||||
@@ -40,7 +40,7 @@ class DiagramPropertiesDialog : public QDialog {
|
||||
void editAutoFolioNum ();
|
||||
|
||||
private:
|
||||
Diagram *m_diagram;
|
||||
Diagram *m_diagram;
|
||||
ConductorPropertiesWidget *m_cpw;
|
||||
};
|
||||
|
||||
|
||||
@@ -44,15 +44,19 @@ void DiagramPropertiesEditorDockWidget::setDiagram(Diagram *diagram)
|
||||
|
||||
if (m_diagram)
|
||||
{
|
||||
disconnect(m_diagram, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
|
||||
disconnect(m_diagram, SIGNAL(destroyed()), this, SLOT(diagramWasDeleted()));
|
||||
disconnect(m_diagram, SIGNAL(selectionChanged()),
|
||||
this, SLOT(selectionChanged()));
|
||||
disconnect(m_diagram, SIGNAL(destroyed()),
|
||||
this, SLOT(diagramWasDeleted()));
|
||||
}
|
||||
|
||||
if (diagram)
|
||||
{
|
||||
m_diagram = diagram;
|
||||
connect(m_diagram, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()), Qt::QueuedConnection);
|
||||
connect(m_diagram, SIGNAL(destroyed()), this, SLOT(diagramWasDeleted()));
|
||||
connect(m_diagram, SIGNAL(selectionChanged()),
|
||||
this, SLOT(selectionChanged()), Qt::QueuedConnection);
|
||||
connect(m_diagram, SIGNAL(destroyed()),
|
||||
this, SLOT(diagramWasDeleted()));
|
||||
selectionChanged();
|
||||
}
|
||||
else
|
||||
@@ -74,7 +78,10 @@ void DiagramPropertiesEditorDockWidget::selectionChanged()
|
||||
return;
|
||||
}
|
||||
|
||||
auto editor_ = PropertiesEditorFactory::propertiesEditor(m_diagram->selectedItems(), editors().count()? editors().first() : nullptr, this);
|
||||
auto editor_ = PropertiesEditorFactory::propertiesEditor(
|
||||
m_diagram->selectedItems(),
|
||||
editors().count() ? editors().first() : nullptr,
|
||||
this);
|
||||
if (!editor_) {
|
||||
clear();
|
||||
return;
|
||||
|
||||
@@ -33,14 +33,16 @@ diagramselection::diagramselection(QETProject *prj, QWidget *parent) :
|
||||
load_TableDiagram();
|
||||
}
|
||||
|
||||
diagramselection::~diagramselection() {
|
||||
diagramselection::~diagramselection()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief load all Diagrams of project in table
|
||||
*/
|
||||
void diagramselection::load_TableDiagram() {
|
||||
void diagramselection::load_TableDiagram()
|
||||
{
|
||||
// Clear all items
|
||||
ui -> tableDiagram -> clear();
|
||||
for (int i=ui -> tableDiagram -> rowCount()-1; i >= 0; --i) {
|
||||
@@ -84,7 +86,8 @@ void diagramselection::load_TableDiagram() {
|
||||
@brief get list of Diagrams is selected
|
||||
@return this list of Diagrams
|
||||
*/
|
||||
QList<Diagram *> diagramselection::list_of_DiagramSelected() {
|
||||
QList<Diagram *> diagramselection::list_of_DiagramSelected()
|
||||
{
|
||||
QList<Diagram *> listDiag;
|
||||
for(int i=0; i<ui -> tableDiagram -> rowCount();i++){
|
||||
if(ui -> tableDiagram -> item(i, 0)->checkState()){
|
||||
|
||||
@@ -38,7 +38,8 @@ DialogWaiting::DialogWaiting(QWidget *parent) :
|
||||
/**
|
||||
@brief DialogWaiting::~DialogWaiting
|
||||
*/
|
||||
DialogWaiting::~DialogWaiting() {
|
||||
DialogWaiting::~DialogWaiting()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -54,7 +55,8 @@ void DialogWaiting::setProgressBar(int val){
|
||||
/**
|
||||
@brief DialogWaiting::setProgressReset, clear progressBar and reset
|
||||
*/
|
||||
void DialogWaiting::setProgressReset(){
|
||||
void DialogWaiting::setProgressReset()
|
||||
{
|
||||
ui->progressBar->reset();
|
||||
}
|
||||
|
||||
|
||||
@@ -79,16 +79,18 @@ class DynamicElementTextModel : public QStandardItemModel
|
||||
bool indexIsText(const QModelIndex &index) const;
|
||||
bool indexIsGroup(const QModelIndex &index) const;
|
||||
|
||||
bool canDropMimeData(const QMimeData *data,
|
||||
Qt::DropAction action,
|
||||
int row,
|
||||
int column,
|
||||
const QModelIndex &parent) const override;
|
||||
bool dropMimeData(const QMimeData *data,
|
||||
Qt::DropAction action,
|
||||
int row,
|
||||
int column,
|
||||
const QModelIndex &parent) override;
|
||||
bool canDropMimeData(
|
||||
const QMimeData *data,
|
||||
Qt::DropAction action,
|
||||
int row,
|
||||
int column,
|
||||
const QModelIndex &parent) const override;
|
||||
bool dropMimeData(
|
||||
const QMimeData *data,
|
||||
Qt::DropAction action,
|
||||
int row,
|
||||
int column,
|
||||
const QModelIndex &parent) override;
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const override;
|
||||
QStringList mimeTypes() const override;
|
||||
|
||||
@@ -101,12 +103,14 @@ class DynamicElementTextModel : public QStandardItemModel
|
||||
void removeText(DynamicElementTextItem *deti);
|
||||
void addGroup(ElementTextItemGroup *group);
|
||||
void removeGroup(ElementTextItemGroup *group);
|
||||
void addTextToGroup(DynamicElementTextItem *deti,
|
||||
ElementTextItemGroup *group);
|
||||
void addTextToGroup(
|
||||
DynamicElementTextItem *deti,
|
||||
ElementTextItemGroup *group);
|
||||
void removeTextFromGroup(DynamicElementTextItem *deti,
|
||||
ElementTextItemGroup *group);
|
||||
void enableSourceText(DynamicElementTextItem *deti,
|
||||
DynamicElementTextItem::TextFrom tf );
|
||||
void enableSourceText(
|
||||
DynamicElementTextItem *deti,
|
||||
DynamicElementTextItem::TextFrom tf );
|
||||
void enableGroupRotationAndPos(ElementTextItemGroup *group);
|
||||
void itemDataChanged(QStandardItem *qsi);
|
||||
void setConnection(DynamicElementTextItem *deti, bool set);
|
||||
@@ -134,12 +138,14 @@ class DynamicTextItemDelegate : public QStyledItemDelegate
|
||||
public:
|
||||
DynamicTextItemDelegate(QObject *parent = Q_NULLPTR);
|
||||
|
||||
QWidget *createEditor(QWidget *parent,
|
||||
const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const override;
|
||||
void setModelData(QWidget *editor,
|
||||
QAbstractItemModel *model,
|
||||
const QModelIndex &index) const override;
|
||||
QWidget *createEditor(
|
||||
QWidget *parent,
|
||||
const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const override;
|
||||
void setModelData(
|
||||
QWidget *editor,
|
||||
QAbstractItemModel *model,
|
||||
const QModelIndex &index) const override;
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *object, QEvent *event) override;
|
||||
|
||||
@@ -30,9 +30,10 @@ typedef SearchAndReplaceWorker sarw;
|
||||
@param translated_key the string key translated
|
||||
@param parent parent widget
|
||||
*/
|
||||
ElementInfoPartWidget::ElementInfoPartWidget(QString key,
|
||||
const QString& translated_key,
|
||||
QWidget *parent):
|
||||
ElementInfoPartWidget::ElementInfoPartWidget(
|
||||
QString key,
|
||||
const QString& translated_key,
|
||||
QWidget *parent):
|
||||
QWidget(parent),
|
||||
ui(new Ui::ElementInfoPartWidget),
|
||||
key_(std::move(key))
|
||||
|
||||
@@ -35,12 +35,14 @@ class ElementInfoPartWidget : public QWidget
|
||||
|
||||
//METHODS
|
||||
public:
|
||||
explicit ElementInfoPartWidget(QString key,
|
||||
const QString& translated_key,
|
||||
QWidget *parent = nullptr);
|
||||
explicit ElementInfoPartWidget(
|
||||
QString key,
|
||||
const QString& translated_key,
|
||||
QWidget *parent = nullptr);
|
||||
~ElementInfoPartWidget() override;
|
||||
|
||||
QString key () const {return key_;}
|
||||
QString key () const
|
||||
{return key_;}
|
||||
QString text () const;
|
||||
void setText (const QString &);
|
||||
void setPlaceHolderText (const QString &text);
|
||||
|
||||
@@ -254,7 +254,8 @@ DiagramContext ElementInfoWidget::currentInfo() const
|
||||
Slot activated when this widget is show.
|
||||
Set the focus to the first line edit provided by this widget
|
||||
*/
|
||||
void ElementInfoWidget::firstActivated() {
|
||||
void ElementInfoWidget::firstActivated()
|
||||
{
|
||||
m_eipw_list.first() -> setFocusTolineEdit();
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,8 @@ void ElementPropertiesWidget::apply()
|
||||
@brief ElementPropertiesWidget::reset
|
||||
Reset the edited properties
|
||||
*/
|
||||
void ElementPropertiesWidget::reset() {
|
||||
void ElementPropertiesWidget::reset()
|
||||
{
|
||||
foreach (PropertiesEditorWidget *pew, m_list_editor) pew->reset();
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,8 @@ ImagePropertiesWidget::ImagePropertiesWidget(DiagramImageItem *image, QWidget *p
|
||||
@brief ImagePropertiesWidget::~ImagePropertiesWidget
|
||||
Destructor
|
||||
*/
|
||||
ImagePropertiesWidget::~ImagePropertiesWidget() {
|
||||
ImagePropertiesWidget::~ImagePropertiesWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -168,6 +169,7 @@ void ImagePropertiesWidget::on_m_scale_slider_valueChanged(int value)
|
||||
@brief ImagePropertiesWidget::on_m_lock_pos_cb_clicked
|
||||
Set movable or not the image according to corresponding check box
|
||||
*/
|
||||
void ImagePropertiesWidget::on_m_lock_pos_cb_clicked() {
|
||||
void ImagePropertiesWidget::on_m_lock_pos_cb_clicked()
|
||||
{
|
||||
m_image->setMovable(!ui->m_lock_pos_cb->isChecked());
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ void ImportElementTextPatternDialog::setComboBoxItems(const QStringList &items)
|
||||
ui->m_combo_box->addItems(items);
|
||||
}
|
||||
|
||||
QString ImportElementTextPatternDialog::textValue() const {
|
||||
QString ImportElementTextPatternDialog::textValue() const
|
||||
{
|
||||
return ui->m_combo_box->currentText();
|
||||
}
|
||||
|
||||
@@ -57,7 +57,8 @@ IndiTextPropertiesWidget::IndiTextPropertiesWidget(
|
||||
/**
|
||||
@brief IndiTextPropertiesWidget::~IndiTextPropertiesWidget
|
||||
*/
|
||||
IndiTextPropertiesWidget::~IndiTextPropertiesWidget() {
|
||||
IndiTextPropertiesWidget::~IndiTextPropertiesWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -421,7 +422,8 @@ void IndiTextPropertiesWidget::updateUi()
|
||||
/**
|
||||
@brief IndiTextPropertiesWidget::on_m_advanced_editor_pb_clicked
|
||||
*/
|
||||
void IndiTextPropertiesWidget::on_m_advanced_editor_pb_clicked() {
|
||||
void IndiTextPropertiesWidget::on_m_advanced_editor_pb_clicked()
|
||||
{
|
||||
if (m_text) {
|
||||
m_text->edit();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@ MarginsEditDialog::~MarginsEditDialog()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QMargins MarginsEditDialog::margins() const {
|
||||
QMargins MarginsEditDialog::margins() const
|
||||
{
|
||||
return QMargins(ui->m_left_sb->value(),
|
||||
ui->m_top_sb->value(),
|
||||
ui->m_right_sb->value(),
|
||||
@@ -51,9 +52,8 @@ QMargins MarginsEditDialog::margins() const {
|
||||
@return The a margins with the edited value if dialog is accepted
|
||||
or a default constructed QMargins() if dialog is rejected
|
||||
*/
|
||||
QMargins MarginsEditDialog::getMargins(QMargins margins,
|
||||
bool *accepted,
|
||||
QWidget *parent)
|
||||
QMargins MarginsEditDialog::getMargins(
|
||||
QMargins margins, bool *accepted, QWidget *parent)
|
||||
{
|
||||
QScopedPointer<MarginsEditDialog> d(
|
||||
new MarginsEditDialog(margins, parent));
|
||||
|
||||
@@ -169,7 +169,8 @@ void MasterPropertiesWidget::setElement(Element *element)
|
||||
Return true if link change, else false
|
||||
@note is void no Return ???
|
||||
*/
|
||||
void MasterPropertiesWidget::apply() {
|
||||
void MasterPropertiesWidget::apply()
|
||||
{
|
||||
if (QUndoCommand *undo = associatedUndo())
|
||||
m_element -> diagram() -> undoStack().push(undo);
|
||||
}
|
||||
@@ -409,7 +410,8 @@ void MasterPropertiesWidget::showElementFromTWI(QTreeWidgetItem *qtwi, int colum
|
||||
@brief MasterPropertiesWidget::showedElementWasDeleted
|
||||
Set to nullptr the current showed element when he was deleted
|
||||
*/
|
||||
void MasterPropertiesWidget::showedElementWasDeleted() {
|
||||
void MasterPropertiesWidget::showedElementWasDeleted()
|
||||
{
|
||||
m_showed_element = nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ ProjectPropertiesDialog::ProjectPropertiesDialog(QETProject *project, QWidget *p
|
||||
ProjectAutoNumConfigPage *projectAutoNumConfigPage = new ProjectAutoNumConfigPage (project);
|
||||
m_properties_dialog = new ConfigDialog (parent);
|
||||
m_properties_dialog -> setWindowTitle(QObject::tr("Propriétés du projet", "window title"));
|
||||
m_properties_dialog -> addPage(new ProjectMainConfigPage (project));
|
||||
m_properties_dialog -> addPage(new ProjectMainConfigPage(project));
|
||||
m_properties_dialog -> addPage(newDiagramPage);
|
||||
m_properties_dialog -> addPage(projectAutoNumConfigPage);
|
||||
connect(projectAutoNumConfigPage,SIGNAL(setAutoNum(QString)),newDiagramPage,SLOT(setFolioAutonum(QString)));
|
||||
@@ -44,7 +44,8 @@ ProjectPropertiesDialog::ProjectPropertiesDialog(QETProject *project, QWidget *p
|
||||
/**
|
||||
@brief ProjectPropertiesDialog::~ProjectPropertiesDialog
|
||||
*/
|
||||
ProjectPropertiesDialog::~ProjectPropertiesDialog () {
|
||||
ProjectPropertiesDialog::~ProjectPropertiesDialog ()
|
||||
{
|
||||
delete m_properties_dialog;
|
||||
}
|
||||
|
||||
@@ -52,7 +53,8 @@ ProjectPropertiesDialog::~ProjectPropertiesDialog () {
|
||||
@brief ProjectPropertiesDialog::exec
|
||||
execute this dialog.
|
||||
*/
|
||||
void ProjectPropertiesDialog::exec() {
|
||||
void ProjectPropertiesDialog::exec()
|
||||
{
|
||||
m_properties_dialog->setWindowModality(Qt::WindowModal);
|
||||
m_properties_dialog -> exec();
|
||||
}
|
||||
@@ -70,7 +72,8 @@ void ProjectPropertiesDialog::setCurrentPage(ProjectPropertiesDialog::Page p) {
|
||||
@brief ProjectPropertiesDialog::changeToFolio
|
||||
Change the current displayed tab to folio tab.
|
||||
*/
|
||||
void ProjectPropertiesDialog::changeToFolio() {
|
||||
void ProjectPropertiesDialog::changeToFolio()
|
||||
{
|
||||
ProjectAutoNumConfigPage *autoNumPage =
|
||||
static_cast <ProjectAutoNumConfigPage*>(
|
||||
m_properties_dialog->pages.at(2));
|
||||
|
||||
@@ -39,6 +39,7 @@ void ReportPropertieWidget::setReportProperties(const QString& label) {
|
||||
ui->line_edit->setText(label);
|
||||
}
|
||||
|
||||
QString ReportPropertieWidget::ReportProperties() const {
|
||||
QString ReportPropertieWidget::ReportProperties() const
|
||||
{
|
||||
return ui->line_edit->text();
|
||||
}
|
||||
|
||||
@@ -154,7 +154,8 @@ void ShapeGraphicsItemPropertiesWidget::apply()
|
||||
@brief ShapeGraphicsItemPropertiesWidget::reset
|
||||
Reset the change
|
||||
*/
|
||||
void ShapeGraphicsItemPropertiesWidget::reset() {
|
||||
void ShapeGraphicsItemPropertiesWidget::reset()
|
||||
{
|
||||
updateUi();
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,8 @@ void TitleBlockPropertiesWidget::setProperties(
|
||||
@brief TitleBlockPropertiesWidget::properties
|
||||
@return the edited properties
|
||||
*/
|
||||
TitleBlockProperties TitleBlockPropertiesWidget::properties() const {
|
||||
TitleBlockProperties TitleBlockPropertiesWidget::properties() const
|
||||
{
|
||||
TitleBlockProperties prop;
|
||||
prop.title = ui -> m_title_le -> text();
|
||||
prop.author = ui -> m_author_le -> text();
|
||||
@@ -209,7 +210,8 @@ TitleBlockProperties TitleBlockPropertiesWidget::properties() const {
|
||||
@return return properties to enable folio autonum
|
||||
*/
|
||||
TitleBlockProperties TitleBlockPropertiesWidget::propertiesAutoNum(
|
||||
QString autoNum) const {
|
||||
QString autoNum) const
|
||||
{
|
||||
TitleBlockProperties prop;
|
||||
prop.title = ui -> m_title_le -> text();
|
||||
prop.author = ui -> m_author_le -> text();
|
||||
@@ -265,7 +267,8 @@ TitleBlockTemplateLocation TitleBlockPropertiesWidget::currentTitleBlockLocation
|
||||
if true, title block template combo box and menu button is visible
|
||||
*/
|
||||
void TitleBlockPropertiesWidget::setTitleBlockTemplatesVisible(
|
||||
const bool &visible) {
|
||||
const bool &visible)
|
||||
{
|
||||
ui -> m_tbt_label -> setVisible(visible);
|
||||
ui -> m_tbt_cb -> setVisible(visible);
|
||||
ui -> m_tbt_pb -> setVisible(visible);
|
||||
@@ -283,7 +286,8 @@ void TitleBlockPropertiesWidget::setReadOnly(const bool &ro) {
|
||||
@brief TitleBlockPropertiesWidget::currentTitleBlockTemplateName
|
||||
@return the current title block name
|
||||
*/
|
||||
QString TitleBlockPropertiesWidget::currentTitleBlockTemplateName() const {
|
||||
QString TitleBlockPropertiesWidget::currentTitleBlockTemplateName() const
|
||||
{
|
||||
int index = ui -> m_tbt_cb -> currentIndex();
|
||||
if(index != -1)
|
||||
return (ui -> m_tbt_cb -> itemData(index).toString());
|
||||
@@ -298,7 +302,8 @@ QString TitleBlockPropertiesWidget::currentTitleBlockTemplateName() const {
|
||||
void TitleBlockPropertiesWidget::addCollection(
|
||||
TitleBlockTemplatesCollection *tbt_collection)
|
||||
{
|
||||
if (!tbt_collection || m_tbt_collection_list.contains(tbt_collection)) return;
|
||||
if (!tbt_collection || m_tbt_collection_list.contains(tbt_collection))
|
||||
return;
|
||||
m_tbt_collection_list << tbt_collection;
|
||||
}
|
||||
|
||||
@@ -308,8 +313,9 @@ void TitleBlockPropertiesWidget::addCollection(
|
||||
@param current_date : true for display current date radio button
|
||||
@param project
|
||||
*/
|
||||
void TitleBlockPropertiesWidget::initDialog(const bool ¤t_date,
|
||||
QETProject *project) {
|
||||
void TitleBlockPropertiesWidget::initDialog(
|
||||
const bool ¤t_date,QETProject *project)
|
||||
{
|
||||
m_dcw = new DiagramContextWidget();
|
||||
ui -> m_tab2_vlayout -> addWidget(m_dcw);
|
||||
|
||||
@@ -374,11 +380,13 @@ int TitleBlockPropertiesWidget::getIndexFor(
|
||||
return -1;
|
||||
}
|
||||
|
||||
void TitleBlockPropertiesWidget::editCurrentTitleBlockTemplate() {
|
||||
void TitleBlockPropertiesWidget::editCurrentTitleBlockTemplate()
|
||||
{
|
||||
QETApp::instance()->openTitleBlockTemplate(currentTitleBlockLocation(), false);
|
||||
}
|
||||
|
||||
void TitleBlockPropertiesWidget::duplicateCurrentTitleBlockTemplate() {
|
||||
void TitleBlockPropertiesWidget::duplicateCurrentTitleBlockTemplate()
|
||||
{
|
||||
QETApp::instance()->openTitleBlockTemplate(currentTitleBlockLocation(), true);
|
||||
}
|
||||
|
||||
@@ -455,7 +463,8 @@ void TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate(int index)
|
||||
@brief TitleBlockPropertiesWidget::on_m_date_now_pb_clicked
|
||||
Set the date to current date
|
||||
*/
|
||||
void TitleBlockPropertiesWidget::on_m_date_now_pb_clicked() {
|
||||
void TitleBlockPropertiesWidget::on_m_date_now_pb_clicked()
|
||||
{
|
||||
ui -> m_date_edit -> setDate(QDate::currentDate());
|
||||
}
|
||||
|
||||
@@ -463,7 +472,8 @@ void TitleBlockPropertiesWidget::on_m_date_now_pb_clicked() {
|
||||
@brief TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked
|
||||
Open Auto Folio Num dialog
|
||||
*/
|
||||
void TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked() {
|
||||
void TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked()
|
||||
{
|
||||
emit openAutoNumFolioEditor(ui->auto_page_cb->currentText());
|
||||
if (ui->auto_page_cb->currentText()!=tr("Créer un Folio Numérotation Auto"))
|
||||
{
|
||||
|
||||
@@ -69,7 +69,8 @@ void XRefPropertiesWidget::setProperties(const QHash <QString,
|
||||
@brief XRefPropertiesWidget::properties
|
||||
@return the properties edited by this widget
|
||||
*/
|
||||
QHash <QString, XRefProperties> XRefPropertiesWidget::properties(){
|
||||
QHash <QString, XRefProperties> XRefPropertiesWidget::properties()
|
||||
{
|
||||
saveProperties(ui->m_type_cb->currentIndex());
|
||||
return m_properties;
|
||||
}
|
||||
@@ -150,7 +151,8 @@ void XRefPropertiesWidget::saveProperties(int index) {
|
||||
@brief XRefPropertiesWidget::updateDisplay
|
||||
Update display with the curent displayed type.
|
||||
*/
|
||||
void XRefPropertiesWidget::updateDisplay() {
|
||||
void XRefPropertiesWidget::updateDisplay()
|
||||
{
|
||||
QString type = ui->m_type_cb->itemData(ui->m_type_cb->currentIndex()).toString();
|
||||
XRefProperties xrp = m_properties[type];
|
||||
|
||||
@@ -197,7 +199,8 @@ void XRefPropertiesWidget::updateDisplay() {
|
||||
manage the save of the current properties,
|
||||
when the combo box of type change.
|
||||
*/
|
||||
void XRefPropertiesWidget::typeChanged() {
|
||||
void XRefPropertiesWidget::typeChanged()
|
||||
{
|
||||
//save the properties of the previous xref type
|
||||
saveProperties(m_previous_type_index);
|
||||
//update display with the current xref type
|
||||
|
||||
Reference in New Issue
Block a user