summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/forms/widgets/kexidbautofield.h
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/forms/widgets/kexidbautofield.h')
-rw-r--r--kexi/plugins/forms/widgets/kexidbautofield.h107
1 files changed, 54 insertions, 53 deletions
diff --git a/kexi/plugins/forms/widgets/kexidbautofield.h b/kexi/plugins/forms/widgets/kexidbautofield.h
index 981a0519..f13e701e 100644
--- a/kexi/plugins/forms/widgets/kexidbautofield.h
+++ b/kexi/plugins/forms/widgets/kexidbautofield.h
@@ -22,39 +22,40 @@
#ifndef KEXIDBAUTOFIELD_H
#define KEXIDBAUTOFIELD_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kexidb/field.h>
#include <formeditor/container.h>
#include <formeditor/widgetwithsubpropertiesinterface.h>
#include "kexiformdataiteminterface.h"
-class QBoxLayout;
-class QLabel;
+class TQBoxLayout;
+class TQLabel;
//! Universal "Auto Field" widget for Kexi forms
/*! It acts as a container for most data-aware widgets. */
class KEXIFORMUTILS_EXPORT KexiDBAutoField :
- public QWidget,
+ public TQWidget,
public KexiFormDataItemInterface,
public KFormDesigner::DesignTimeDynamicChildWidgetHandler,
public KFormDesigner::WidgetWithSubpropertiesInterface
{
Q_OBJECT
-//'caption' is uncovered now Q_PROPERTY(QString labelCaption READ caption WRITE setCaption DESIGNABLE true)
- Q_OVERRIDE(QString caption READ caption WRITE setCaption DESIGNABLE true)
- Q_OVERRIDE(QColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor DESIGNABLE true RESET unsetPalette)
- Q_OVERRIDE(QColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor DESIGNABLE true RESET unsetPalette)
- Q_PROPERTY(QColor foregroundLabelColor READ foregroundLabelColor WRITE setForegroundLabelColor DESIGNABLE true RESET unsetPalette)
- Q_PROPERTY(QColor backgroundLabelColor READ backgroundLabelColor WRITE setBackgroundLabelColor DESIGNABLE true RESET unsetPalette)
- Q_PROPERTY(bool autoCaption READ hasAutoCaption WRITE setAutoCaption DESIGNABLE true)
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
- Q_PROPERTY(LabelPosition labelPosition READ labelPosition WRITE setLabelPosition DESIGNABLE true)
- Q_PROPERTY(WidgetType widgetType READ widgetType WRITE setWidgetType DESIGNABLE true)
+ TQ_OBJECT
+//'caption' is uncovered now TQ_PROPERTY(TQString labelCaption READ caption WRITE setCaption DESIGNABLE true)
+ TQ_OVERRIDE(TQString caption READ caption WRITE setCaption DESIGNABLE true)
+ TQ_OVERRIDE(TQColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor DESIGNABLE true RESET unsetPalette)
+ TQ_OVERRIDE(TQColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor DESIGNABLE true RESET unsetPalette)
+ TQ_PROPERTY(TQColor foregroundLabelColor READ foregroundLabelColor WRITE setForegroundLabelColor DESIGNABLE true RESET unsetPalette)
+ TQ_PROPERTY(TQColor backgroundLabelColor READ backgroundLabelColor WRITE setBackgroundLabelColor DESIGNABLE true RESET unsetPalette)
+ TQ_PROPERTY(bool autoCaption READ hasAutoCaption WRITE setAutoCaption DESIGNABLE true)
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+ TQ_PROPERTY(LabelPosition labelPosition READ labelPosition WRITE setLabelPosition DESIGNABLE true)
+ TQ_PROPERTY(WidgetType widgetType READ widgetType WRITE setWidgetType DESIGNABLE true)
/*internal, for design time only*/
- Q_PROPERTY(int fieldTypeInternal READ fieldTypeInternal WRITE setFieldTypeInternal DESIGNABLE true STORED false)
- Q_PROPERTY(QString fieldCaptionInternal READ fieldCaptionInternal WRITE setFieldCaptionInternal DESIGNABLE true STORED false)
+ TQ_PROPERTY(int fieldTypeInternal READ fieldTypeInternal WRITE setFieldTypeInternal DESIGNABLE true STORED false)
+ TQ_PROPERTY(TQString fieldCaptionInternal READ fieldCaptionInternal WRITE setFieldCaptionInternal DESIGNABLE true STORED false)
Q_ENUMS( WidgetType LabelPosition )
public:
@@ -62,24 +63,24 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
MultiLineText, ComboBox, Image };
enum LabelPosition { Left = 300, Top, NoLabel };
- KexiDBAutoField(const QString &text, WidgetType type, LabelPosition pos,
- QWidget *parent = 0, const char *name = 0, bool designMode = true);
- KexiDBAutoField(QWidget *parent = 0, const char *name = 0, bool designMode = true,
+ KexiDBAutoField(const TQString &text, WidgetType type, LabelPosition pos,
+ TQWidget *tqparent = 0, const char *name = 0, bool designMode = true);
+ KexiDBAutoField(TQWidget *tqparent = 0, const char *name = 0, bool designMode = true,
LabelPosition pos = Left);
virtual ~KexiDBAutoField();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual void setDataSource( const QString &ds );
- virtual void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual void setDataSource( const TQString &ds );
+ virtual void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setColumnInfo(KexiDB::QueryColumnInfo* cinfo);
- virtual void setInvalidState(const QString& text);
+ virtual void setInvalidState(const TQString& text);
virtual bool isReadOnly() const;
virtual void setReadOnly( bool readOnly );
- virtual QVariant value();
+ virtual TQVariant value();
virtual bool valueIsNull();
virtual bool valueIsEmpty();
virtual bool valueIsValid();
@@ -95,8 +96,8 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
LabelPosition labelPosition() const;
virtual void setLabelPosition(LabelPosition position);
- QString caption() const;
- void setCaption(const QString &caption);
+ TQString caption() const;
+ void setCaption(const TQString &caption);
bool hasAutoCaption() const;
void setAutoCaption(bool autoCaption);
@@ -105,10 +106,10 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
is displayed in a special way. Used by KexiFormDataProvider::fillDataItems().
\a widget is equal to 'this'.
Reimplemented after KexiFormDataItemInterface. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
- QWidget* editor() const;
- QLabel* label() const;
+ TQWidget* editor() const;
+ TQLabel* label() const;
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -123,56 +124,56 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
/*! On design time it is not possible to pass a reference to KexiDB::Field object
so we're just providing field caption. Only used when widget type is Auto.
@internal */
- void setFieldCaptionInternal(const QString& text);
+ void setFieldCaptionInternal(const TQString& text);
/*! @internal */
int fieldTypeInternal() const;
/*! @internal */
- QString fieldCaptionInternal() const;
+ TQString fieldCaptionInternal() const;
- virtual QSize sizeHint() const;
- virtual void setFocusPolicy ( FocusPolicy policy );
+ virtual TQSize tqsizeHint() const;
+ virtual void setFocusPolicy ( TQ_FocusPolicy policy );
//! Reimplemented to return internal editor's color.
- const QColor & paletteForegroundColor() const;
+ const TQColor & paletteForegroundColor() const;
//! Reimplemented to set internal editor's color.
- void setPaletteForegroundColor( const QColor & color );
+ void setPaletteForegroundColor( const TQColor & color );
//! Reimplemented to return internal editor's color.
- const QColor & paletteBackgroundColor() const;
+ const TQColor & paletteBackgroundColor() const;
//! Reimplemented to set internal editor's color.
- virtual void setPaletteBackgroundColor( const QColor & color );
+ virtual void setPaletteBackgroundColor( const TQColor & color );
//! \return label's foreground color
- const QColor & foregroundLabelColor() const;
+ const TQColor & foregroundLabelColor() const;
//! Sets label's foreground color
- virtual void setForegroundLabelColor( const QColor & color );
+ virtual void setForegroundLabelColor( const TQColor & color );
//! \return label's background color
- const QColor & backgroundLabelColor() const;
+ const TQColor & backgroundLabelColor() const;
//! Sets label's background color
- virtual void setBackgroundLabelColor( const QColor & color );
+ virtual void setBackgroundLabelColor( const TQColor & color );
//! Reimplemented to accept subproperties. @see KFormDesigner::WidgetWithSubpropertiesInterface
- virtual QVariant property( const char * name ) const;
+ virtual TQVariant property( const char * name ) const;
//! Reimplemented to accept subproperties. @see KFormDesigner::WidgetWithSubpropertiesInterface
- virtual bool setProperty( const char * name, const QVariant & value );
+ virtual bool setProperty( const char * name, const TQVariant & value );
/*! Called by the top-level form on key press event to consume widget-specific shortcuts. */
- virtual bool keyPressed(QKeyEvent *ke);
+ virtual bool keyPressed(TQKeyEvent *ke);
public slots:
virtual void unsetPalette();
protected slots:
// void slotValueChanged();
- virtual void paletteChange( const QPalette& oldPal );
+ virtual void paletteChange( const TQPalette& oldPal );
//! Implemented for KexiDataItemInterface
virtual void moveCursorToEnd();
@@ -184,17 +185,17 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
virtual void selectAll();
protected:
- virtual void setValueInternal(const QVariant&add, bool removeOld);
- void init(const QString &text, WidgetType type, LabelPosition pos);
+ virtual void setValueInternal(const TQVariant&add, bool removeOld);
+ void init(const TQString &text, WidgetType type, LabelPosition pos);
virtual void createEditor();
- void changeText(const QString &text, bool beautify = true);
-// virtual void paintEvent( QPaintEvent* pe );
+ void changeText(const TQString &text, bool beautify = true);
+// virtual void paintEvent( TQPaintEvent* pe );
void updateInformationAboutUnboundField();
//! internal editor can be created too late, so certain properties should be copied
void copyPropertiesToEditor();
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
//! Used by @ref setLabelPositionInternal(LabelPosition)
void setLabelPositionInternal(LabelPosition position, bool noLabel);