Remove unused class

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4923 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2017-02-27 17:04:47 +00:00
parent edd18042ec
commit 257fc42e35
3 changed files with 0 additions and 200 deletions

View File

@@ -1,79 +0,0 @@
/*
Copyright 2006-2017 The QElectroTech Team
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/>.
*/
#include "autonumselectorwidget.h"
#include "ui_autonumselectorwidget.h"
/**
* @brief AutonumSelectorWidget::AutonumSelectorWidget
* Constructor with texts to fill the combo box
* @param items, items for fill the combo box
* @param parent, parent widget
*/
AutonumSelectorWidget::AutonumSelectorWidget(const QStringList &items, QWidget *parent) :
QWidget(parent),
ui(new Ui::AutonumSelectorWidget)
{
ui->setupUi(this);
ui -> m_available_autonum_cb -> addItems(items);
}
/**
* @brief AutonumSelectorWidget::~AutonumSelectorWidget
* Destructor
*/
AutonumSelectorWidget::~AutonumSelectorWidget() {
delete ui;
}
/**
* @brief AutonumSelectorWidget::setCurrentItem
* Set the combo box current index by text.
* If text doesn't exist, set current index -1
* @param item, item of index
*/
void AutonumSelectorWidget::setCurrentItem(const QString &item) {
ui -> m_available_autonum_cb -> setCurrentIndex( ui -> m_available_autonum_cb -> findText(item));
}
/**
* @brief AutonumSelectorWidget::setItems
* Populate this widget with the content of @items
* Previous items is clear.
* @param items
*/
void AutonumSelectorWidget::setItems(const QStringList &items) {
ui -> m_available_autonum_cb -> clear();
ui -> m_available_autonum_cb -> addItems(items);
}
/**
* @brief AutonumSelectorWidget::text
* @return the current displayed text
*/
QString AutonumSelectorWidget::text() const {
return ui -> m_available_autonum_cb -> currentText();
}
/**
* @brief AutonumSelectorWidget::on_m_edit_autonum_pb_clicked
* Just emit the signal openAutonumEditor.
* The owner of AutonumSelectorWidget need to connect the signal.
*/
void AutonumSelectorWidget::on_m_edit_autonum_pb_clicked() {
emit openAutonumEditor();
}

View File

@@ -1,55 +0,0 @@
/*
Copyright 2006-2017 The QElectroTech Team
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 AUTONUMSELECTORWIDGET_H
#define AUTONUMSELECTORWIDGET_H
#include <QWidget>
namespace Ui {
class AutonumSelectorWidget;
}
/**
* @brief The AutonumSelectorWidget class
* This widget show a combobox to select an autonum and a button to edit the autonum
* The combo box is empty and the button isn't linked with anything, it's the role of caller
* of this class to fill the combo box and edit the connection with the button.
*/
class AutonumSelectorWidget : public QWidget
{
Q_OBJECT
public:
explicit AutonumSelectorWidget(const QStringList &items, QWidget *parent = 0);
~AutonumSelectorWidget();
void setCurrentItem (const QString &item);
void setItems (const QStringList &items);
QString text () const;
signals:
void openAutonumEditor ();
private slots:
void on_m_edit_autonum_pb_clicked();
private:
Ui::AutonumSelectorWidget *ui;
};
#endif // AUTONUMSELECTORWIDGET_H

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AutonumSelectorWidget</class>
<widget class="QWidget" name="AutonumSelectorWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Autonumérotation :</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="m_available_autonum_cb"/>
</item>
<item>
<spacer name="horizontalSpacer">
<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="QPushButton" name="m_edit_autonum_pb">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>éditer les numérotations</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../qelectrotech.qrc">
<normaloff>:/ico/16x16/configure.png</normaloff>:/ico/16x16/configure.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../../qelectrotech.qrc"/>
</resources>
<connections/>
</ui>