code format
This commit is contained in:
@@ -1,57 +1,75 @@
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 Lesser General Public License for more details.
|
||||
This program 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef QPICONFIGVALUEWIDGET_H
|
||||
#define QPICONFIGVALUEWIDGET_H
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QCheckBox>
|
||||
#include <QSpinBox>
|
||||
#include <QDoubleSpinBox>
|
||||
#include "qpiconfig.h"
|
||||
#include "qvariantedit.h"
|
||||
#include "qrectedit.h"
|
||||
#include "qpointedit.h"
|
||||
#include "colorbutton.h"
|
||||
#include "ecombobox.h"
|
||||
#include "qipedit.h"
|
||||
#include "limits.h"
|
||||
#include "float.h"
|
||||
#include "limits.h"
|
||||
#include "qad_widgets_export.h"
|
||||
#include "qipedit.h"
|
||||
#include "qpiconfig.h"
|
||||
#include "qpointedit.h"
|
||||
#include "qrectedit.h"
|
||||
#include "qvariantedit.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QPushButton>
|
||||
#include <QSpinBox>
|
||||
|
||||
|
||||
class QAD_WIDGETS_EXPORT ConfigValueWidget: public QWidget
|
||||
{
|
||||
class QAD_WIDGETS_EXPORT ConfigValueWidget: public QWidget {
|
||||
Q_OBJECT
|
||||
friend class QPIConfigWidget;
|
||||
friend class QPIConfigNewDialog;
|
||||
|
||||
public:
|
||||
ConfigValueWidget(QWidget * parent = 0);
|
||||
~ConfigValueWidget() {hide();}
|
||||
|
||||
~ConfigValueWidget() { hide(); }
|
||||
|
||||
void setType(const QString & t);
|
||||
void setValue(const QString & v);
|
||||
void setEntry(QPIConfig::Entry * e) {value = e->value(); full_name = e->_full_name; comment = e->comment(); setType(e->type());}
|
||||
|
||||
void setEntry(QPIConfig::Entry * e) {
|
||||
value = e->value();
|
||||
full_name = e->_full_name;
|
||||
comment = e->comment();
|
||||
setType(e->type());
|
||||
}
|
||||
|
||||
private:
|
||||
void hideAll() {w_string.hide(); w_list.hide(); w_bool.hide(); w_integer.hide(); w_float.hide(); w_color.hide(); w_rect.hide(); w_point.hide(); w_ip.hide(); w_enum.hide(); w_path.hide();}
|
||||
|
||||
void hideAll() {
|
||||
w_string.hide();
|
||||
w_list.hide();
|
||||
w_bool.hide();
|
||||
w_integer.hide();
|
||||
w_float.hide();
|
||||
w_color.hide();
|
||||
w_rect.hide();
|
||||
w_point.hide();
|
||||
w_ip.hide();
|
||||
w_enum.hide();
|
||||
w_path.hide();
|
||||
}
|
||||
|
||||
QString type, value, full_name, comment;
|
||||
bool active;
|
||||
QBoxLayout lay;
|
||||
@@ -66,13 +84,12 @@ private:
|
||||
QIPEdit w_ip;
|
||||
QComboBox w_enum;
|
||||
PathEdit w_path;
|
||||
|
||||
|
||||
private slots:
|
||||
void valueChanged();
|
||||
|
||||
|
||||
signals:
|
||||
void changed(ConfigValueWidget * , QString );
|
||||
|
||||
void changed(ConfigValueWidget *, QString);
|
||||
};
|
||||
|
||||
#endif // QPICONFIGVALUEWIDGET_H
|
||||
|
||||
Reference in New Issue
Block a user