mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Improve some widget
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4921 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -34,6 +34,7 @@ SelectAutonumW::SelectAutonumW(int type, QWidget *parent) :
|
||||
{
|
||||
|
||||
ui->setupUi(this);
|
||||
ui->m_comboBox->lineEdit()->setClearButtonEnabled(true);
|
||||
if (m_edited_type == 0)
|
||||
{
|
||||
m_feaw = new FormulaAutonumberingW();
|
||||
@@ -162,6 +163,11 @@ QString SelectAutonumW::formula()
|
||||
return "";
|
||||
}
|
||||
|
||||
QComboBox *SelectAutonumW::contextComboBox() const
|
||||
{
|
||||
return ui->m_comboBox;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SelectAutonumW::on_buttonBox_clicked
|
||||
* Action on @buttonBox clicked
|
||||
@@ -226,14 +232,6 @@ void SelectAutonumW::on_buttonBox_clicked(QAbstractButton *button) {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SelectAutonumW::applyEnableOnContextChanged
|
||||
* enable/disable the apply button after changing the autonum name
|
||||
*/
|
||||
void SelectAutonumW::applyEnableOnContextChanged(QString) {
|
||||
applyEnable(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief SelectAutonumW::applyEnable
|
||||
* enable/disable the apply button
|
||||
@@ -276,7 +274,8 @@ void SelectAutonumW::contextToFormula()
|
||||
* @brief SelectAutonumW::on_m_next_pb_clicked
|
||||
* Increase NumerotationContext
|
||||
*/
|
||||
void SelectAutonumW::on_m_next_pb_clicked() {
|
||||
void SelectAutonumW::on_m_next_pb_clicked()
|
||||
{
|
||||
NumerotationContextCommands ncc (toNumContext());
|
||||
setContext(ncc.next());
|
||||
applyEnable(true);
|
||||
@@ -286,8 +285,20 @@ void SelectAutonumW::on_m_next_pb_clicked() {
|
||||
* @brief SelectAutonumW::on_m_previous_pb_clicked
|
||||
* Decrease NumerotationContext
|
||||
*/
|
||||
void SelectAutonumW::on_m_previous_pb_clicked() {
|
||||
void SelectAutonumW::on_m_previous_pb_clicked()
|
||||
{
|
||||
NumerotationContextCommands ncc (toNumContext());
|
||||
setContext(ncc.previous());
|
||||
applyEnable(true);
|
||||
}
|
||||
|
||||
void SelectAutonumW::on_m_comboBox_currentTextChanged(const QString &arg1)
|
||||
{
|
||||
Q_UNUSED(arg1);
|
||||
applyEnable(true);
|
||||
}
|
||||
|
||||
void SelectAutonumW::on_m_remove_pb_clicked()
|
||||
{
|
||||
emit removeClicked();
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
class NumPartEditorW;
|
||||
class QAbstractButton;
|
||||
class FormulaAutonumberingW;
|
||||
class QComboBox;
|
||||
|
||||
namespace Ui {
|
||||
class SelectAutonumW;
|
||||
@@ -44,24 +45,25 @@ class SelectAutonumW : public QWidget
|
||||
NumerotationContext toNumContext() const;
|
||||
void contextToFormula ();
|
||||
QString formula();
|
||||
QComboBox *contextComboBox() const;
|
||||
|
||||
signals:
|
||||
void applyPressed();
|
||||
void removeClicked();
|
||||
|
||||
//SLOT
|
||||
public slots:
|
||||
void applyEnableOnContextChanged(QString);
|
||||
|
||||
//SLOT
|
||||
private slots:
|
||||
void on_add_button_clicked();
|
||||
void on_remove_button_clicked();
|
||||
void on_buttonBox_clicked(QAbstractButton *);
|
||||
void applyEnable (bool = true);
|
||||
|
||||
//ATTRIBUTES
|
||||
void on_m_next_pb_clicked();
|
||||
void on_m_previous_pb_clicked();
|
||||
|
||||
void on_m_comboBox_currentTextChanged(const QString &arg1);
|
||||
|
||||
//ATTRIBUTES
|
||||
void on_m_remove_pb_clicked();
|
||||
|
||||
private:
|
||||
Ui::SelectAutonumW *ui;
|
||||
QList <NumPartEditorW *> num_part_list_;
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>616</width>
|
||||
<height>421</height>
|
||||
<width>473</width>
|
||||
<height>175</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -20,6 +20,56 @@
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Numérotations disponibles :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="m_comboBox">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Nom de la nouvelle numérotation</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="m_remove_pb">
|
||||
<property name="toolTip">
|
||||
<string>Supprimer la numérotation</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../qelectrotech.qrc">
|
||||
<normaloff>:/ico/16x16/edit-delete.png</normaloff>:/ico/16x16/edit-delete.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="m_widget" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
|
||||
Reference in New Issue
Block a user