36#include "ananasglobal.h"
39#include <qbuttongroup.h>
41#include <qsinterpreter.h>
42#include <qsargument.h>
75class ANANAS_EXPORT aForm :
public QObject
83 QWidget* parentWidget;
84 bool closeAfterSelect;
87 aForm( QWidget *parent,
aEngine *eng );
88 aForm( QWidget *parent,
aEngine *eng, Q_ULONG form_mid = 0,
aWidget* caller = NULL);
89 aForm( QWidget *parent,
aEngine *eng, QString oftype, QObject *aobj = NULL);
93 QWidget*
aParent( QWidget *widget );
96 int SelectGroup( Q_ULLONG
id );
97 Q_ULLONG selectedCatId(){
return db_uid;}
98 Q_ULLONG selectedId(){
return id;}
100 void selected( Q_ULLONG uid );
101 void closeForm( Q_ULLONG );
103 void update( ANANAS_UID );
106 QVariant
tabValue(
const QString &tname,
int row,
int col,
bool dbval=
false);
112 void Show(
bool modal=FALSE);
117 QVariant
Value(
const QString &name);
118 QVariant
DBValue(
const QString &name);
119 int SetValue(
const QString &name, QVariant value);
122 int ColIndex(
const QString &tname,
const QString &colname);
125 QVariant
TabValue(
const QString &tname,
int row,
int col);
126 QVariant
TabDBValue(
const QString &tname,
int row,
int col);
131 void SetTabValue(
const QString &tname,
const QString &colname,
int row, QVariant value);
146 QString
Propis( QString val ,
147 bool need_kopeyki=
true,
149 const QString &end1=
"рублей",
150 const QString &end2=
"рубль",
151 const QString &end3=
"рубля");
152 QString
MoneyToText( QString amount , QString currency );
155 QString
EndOfDay(
const QString& ISODate);
161 QWidget*
Widget( QString name );
162 bool FormHasFunction(
const QString functionName);
175 void on_dbtablerow( QSqlRecord *r );
176 void on_tabupdate( QSqlRecord *r );
178 void on_actionbutton();
179 bool on_form_close();
182 void on_valueChanged(
const QString &s);
183 void on_valueChanged(
const QString & name,
const QVariant & value );
184 void on_tabvalueChanged(
int row,
int col);
185 void on_tabselected( Q_ULLONG uid );
186 void on_event(
const QString &source,
const QString &data );
187 void on_tablerow( Q_ULLONG uid );
217class EventDialog :
public QDialog
221 EventDialog(QWidget * w,
const char * c,
bool m =
false) : QDialog(w, c, m) {};
226 virtual void closeEvent(QCloseEvent * e) {
if(emit(closed())) QDialog::closeEvent(e);
else e->ignore(); };
237class EventWindow :
public QMainWindow
241 EventWindow(QWidget * parent = 0,
const char * name = 0, WFlags f = WType_TopLevel) : QMainWindow(parent, name, f) {};
246 virtual void closeEvent(QCloseEvent * e) {
if(emit(closed())) QMainWindow::closeEvent(e);
else e->ignore(); };
Definition adatabase.h:78