2 Copyright (C) 2013-2024 Ben Kibbey <bjk@luxsci.net>
4 This file is part of qpwmc.
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
21 #ifndef APPLICATIONFORMWIDGET
22 #define APPLICATIONFORMWIDGET
26 class ApplicationFormAttr
29 ApplicationFormAttr (const QString
&n
, const QString
&v
)
35 ~ApplicationFormAttr () { };
52 class ApplicationFormWidget
56 AppWidgetNone
, AppWidgetRadioButton
, AppWidgetSpinBox
, AppWidgetLineEdit
,
57 AppWidgetCheckBox
, AppWidgetDateSelector
,
58 AppWidgetInteralOverwriteCheckBox
61 ApplicationFormWidget ();
62 ~ApplicationFormWidget ();
66 void setValue (QString
);
68 void setElementSelector (bool = true);
69 bool elementSelector ();
70 void setFileSelector (bool = true);
72 void setDateSelector (bool = true);
74 void setPasswordGenerator (bool = true);
75 bool passwordGenerator ();
78 void setChildOf (QString
);
80 void setPwmdName (QString
);
82 void setLabel (QString
);
84 void addRadioButton (QString
);
85 QStringList
radioButtons ();
86 void addRadioButtonId (int);
87 bool hasRadioButtonId (int);
92 void setWhatsThis (QString
);
94 void setAttr (QString name
, QString value
= 0);
95 QString
attr (const QString
&);
96 QList
<ApplicationFormAttr
*> attrs ();
98 void setExpiry (time_t = 0, time_t = 0);
101 void setPlaceholderText (const QString
&);
102 QString
placeholderText ();
108 bool _elementSelector
;
110 bool _passwordGenerator
;
116 QStringList _radioButtons
;
117 QList
<int> _radioButtonIds
;
124 QList
<ApplicationFormAttr
*> _attrs
;
125 QString _placeholderText
;