summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/forms/widgets/kexidbimagebox.h
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/forms/widgets/kexidbimagebox.h')
-rw-r--r--kexi/plugins/forms/widgets/kexidbimagebox.h123
1 files changed, 62 insertions, 61 deletions
diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.h b/kexi/plugins/forms/widgets/kexidbimagebox.h
index 3ad2f710..85b54cd5 100644
--- a/kexi/plugins/forms/widgets/kexidbimagebox.h
+++ b/kexi/plugins/forms/widgets/kexidbimagebox.h
@@ -38,46 +38,47 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
public KexiSubwidgetInterface
{
Q_OBJECT
- Q_PROPERTY( QString dataSource READ dataSource WRITE setDataSource )
- Q_PROPERTY( QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType )
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
-// Q_PROPERTY( QPixmap pixmap READ pixmap WRITE setPixmap )
-// Q_PROPERTY( QByteArray pixmapData READ pixmapData WRITE setPixmapData )
- Q_PROPERTY( uint pixmapId READ pixmapId WRITE setPixmapId DESIGNABLE true STORED false )
- Q_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true )
- Q_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents )
- Q_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio )
- Q_PROPERTY( Alignment alignment READ alignment WRITE setAlignment )
-// Q_PROPERTY( QString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false )
-// Q_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy )
- Q_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible )
- Q_OVERRIDE( int lineWidth READ lineWidth WRITE setLineWidth )
- Q_OVERRIDE( FocusPolicy focusPolicy READ focusPolicyInternal WRITE setFocusPolicy )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString dataSource READ dataSource WRITE setDataSource )
+ TQ_PROPERTY( TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType )
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+// TQ_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap )
+// TQ_PROPERTY( TQByteArray pixmapData READ pixmapData WRITE setPixmapData )
+ TQ_PROPERTY( uint pixmapId READ pixmapId WRITE setPixmapId DESIGNABLE true STORED false )
+ TQ_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true )
+ TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents )
+ TQ_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio )
+ TQ_PROPERTY( int tqalignment READ tqalignment WRITE tqsetAlignment )
+// TQ_PROPERTY( TQString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false )
+// TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy )
+ TQ_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible )
+ TQ_OVERRIDE( int lineWidth READ lineWidth WRITE setLineWidth )
+ TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicyInternal WRITE setFocusPolicy )
public:
- KexiDBImageBox( bool designMode, QWidget *parent, const char *name = 0 );
+ KexiDBImageBox( bool designMode, TQWidget *tqparent, const char *name = 0 );
virtual ~KexiDBImageBox();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value(); // { return m_value.data(); }
+ virtual TQVariant value(); // { return m_value.data(); }
-// QByteArray pixmapData() const { return m_value.data(); }
+// TQByteArray pixmapData() const { return m_value.data(); }
- QPixmap pixmap() const;
+ TQPixmap pixmap() const;
uint pixmapId() const;
uint storedPixmapId() const;
//
- virtual void setInvalidState( const QString& displayText );
+ virtual void setInvalidState( const TQString& displayText );
virtual bool valueIsNull();
virtual bool valueIsEmpty();
- virtual QWidget* widget();
+ virtual TQWidget* widget();
//! always true
virtual bool cursorAtStart();
@@ -86,7 +87,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
virtual bool cursorAtEnd();
// //! used to catch setIndent(), etc.
-// virtual bool setProperty ( const char * name, const QVariant & value );
+// virtual bool setProperty ( const char * name, const TQVariant & value );
virtual bool isReadOnly() const;
@@ -94,28 +95,28 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
// bool designMode() const { return m_designMode; }
- int alignment() const { return m_alignment; }
+ int tqalignment() const { return m_tqalignment; }
bool keepAspectRatio() const { return m_keepAspectRatio; }
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
KexiImageContextMenu *contextMenu() const;
/*! \return original file name of image loaded from a file.
This can be later reused for displaying the image within a collection (to be implemented)
or on saving the image data back to file. */
-//todo QString originalFileName() const { return m_value.originalFileName(); }
+//todo TQString originalFileName() const { return m_value.originalFileName(); }
//! Reimplemented to override behaviour of "lineWidth" property.
virtual void setLineWidth( int width );
//! Reimplemented to override behaviour of "paletteBackgroundColor"
//! and "paletteForegroundColor" properties.
- virtual void setPalette( const QPalette &pal );
+ virtual void setPalette( const TQPalette &pal );
//! Reimplemented to override behaviour of "paletteBackgroundColor" property.
- virtual void setPaletteBackgroundColor( const QColor & color );
+ virtual void setPaletteBackgroundColor( const TQColor & color );
//! \return true id drop down button should be visible (the default).
bool dropDownButtonVisible() const;
@@ -126,14 +127,14 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
/*! Overriden to change the policy behaviour a bit:
NoFocus is returned regardless the real focus flag
if the data source is empty (see dataSource()). */
- FocusPolicy focusPolicy() const;
+ TQ_FocusPolicy focusPolicy() const;
//! \return the internal focus policy value, i.e. the one unrelated to data source presence.
- FocusPolicy focusPolicyInternal() const;
+ TQ_FocusPolicy focusPolicyInternal() const;
/*! Sets the internal focus policy value.
"Internal" means that if there is no data source set, real policy becomes NoFocus. */
- virtual void setFocusPolicy( FocusPolicy policy );
+ virtual void setFocusPolicy( TQ_FocusPolicy policy );
public slots:
void setPixmapId(uint id);
@@ -141,23 +142,23 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
void setStoredPixmapId(uint id);
//! Sets the datasource to \a ds
- virtual void setDataSource( const QString &ds );
+ virtual void setDataSource( const TQString &ds );
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setReadOnly(bool set);
//! Sets \a pixmapData data for this widget. If the widget has data source set,
//! the pixmap will be also placed inside of the buffer and saved later.
-//todo void setPixmapData(const QByteArray& pixmapData) { m_value.setData(pixmapData); }
+//todo void setPixmapData(const TQByteArray& pixmapData) { m_value.setData(pixmapData); }
/*! Sets original file name of image loaded from a file.
@see originalFileName() */
-//todo void setOriginalFileName(const QString& name) { m_value.setOriginalFileName(name); }
+//todo void setOriginalFileName(const TQString& name) { m_value.setOriginalFileName(name); }
void setScaledContents(bool set);
- void setAlignment(int alignment);
+ void tqsetAlignment(int tqalignment);
void setKeepAspectRatio(bool set);
@@ -176,7 +177,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
//! Used for db-aware mode. Emitted when value has been changed.
//! Actual value can be obtained using value().
// virtual void pixmapChanged();
-// virtual void valueChanged(const QByteArray& data);
+// virtual void valueChanged(const TQByteArray& data);
void idChanged(long id);
@@ -184,8 +185,8 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
void slotUpdateActionsAvailabilityRequested(bool& valueIsNull, bool& valueIsReadOnly);
void handleInsertFromFileAction(const KURL& url);
- void handleAboutToSaveAsAction(QString& origFilename, QString& fileExtension, bool& dataIsEmpty);
- void handleSaveAsAction(const QString& fileName);
+ void handleAboutToSaveAsAction(TQString& origFilename, TQString& fileExtension, bool& dataIsEmpty);
+ void handleSaveAsAction(const TQString& fileName);
void handleCutAction();
void handleCopyAction();
void handlePasteAction();
@@ -194,22 +195,22 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
protected:
//! \return data depending on the current mode (db-aware or static)
- QByteArray data() const;
+ TQByteArray data() const;
- virtual void contextMenuEvent ( QContextMenuEvent * e );
-// virtual void mousePressEvent( QMouseEvent *e );
+ virtual void contextMenuEvent ( TQContextMenuEvent * e );
+// virtual void mousePressEvent( TQMouseEvent *e );
virtual void setColumnInfo(KexiDB::QueryColumnInfo* cinfo);
- virtual void paintEvent( QPaintEvent* );
- virtual void resizeEvent( QResizeEvent* e );
- virtual bool eventFilter( QObject * watched, QEvent * e );
+ virtual void paintEvent( TQPaintEvent* );
+ virtual void resizeEvent( TQResizeEvent* e );
+ virtual bool eventFilter( TQObject * watched, TQEvent * e );
//! Sets value \a value for a widget.
- virtual void setValueInternal( const QVariant& add, bool removeOld ) {
+ virtual void setValueInternal( const TQVariant& add, bool removeOld ) {
setValueInternal( add, removeOld, true /*loadPixmap*/ );
}
//! @internal, added \a loadPixmap option used by paste().
- void setValueInternal( const QVariant& add, bool removeOld, bool loadPixmap );
+ void setValueInternal( const TQVariant& add, bool removeOld, bool loadPixmap );
//! Updates i18n'd action strings after datasource change
void updateActionStrings();
@@ -223,7 +224,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
/*! Called by top-level form on key press event.
Used for Key_Escape to if the popup is visible,
so the key press won't be consumed to perform "cancel editing". */
- virtual bool keyPressed(QKeyEvent *ke);
+ virtual bool keyPressed(TQKeyEvent *ke);
//! \return real line width, i.e. for Boxed sunken or Boxed raised
//! frames returns doubled width value.
@@ -232,33 +233,33 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
//! Implemented for KexiSubwidgetInterface
virtual bool subwidgetStretchRequired(KexiDBAutoField* autoField) const;
-// virtual void drawContents ( QPainter *p );
+// virtual void drawContents ( TQPainter *p );
-// virtual void fontChange( const QFont& font );
-// virtual void styleChange( QStyle& style );
+// virtual void fontChange( const TQFont& font );
+// virtual void styleChange( TQStyle& style );
// virtual void enabledChange( bool enabled );
-// virtual void paletteChange( const QPalette& pal );
+// virtual void paletteChange( const TQPalette& pal );
// virtual void frameChanged();
-// virtual void showEvent( QShowEvent* e );
+// virtual void showEvent( TQShowEvent* e );
// void updatePixmapLater();
// class ImageLabel;
// ImageLabel *m_pixmapLabel;
- QPixmap m_pixmap;
- QByteArray m_value; //!< for db-aware mode
- QString m_valueMimeType; //!< for db-aware mode
+ TQPixmap m_pixmap;
+ TQByteArray m_value; //!< for db-aware mode
+ TQString m_valueMimeType; //!< for db-aware mode
// PixmapData m_value;
KexiBLOBBuffer::Handle m_data;
-// QString m_originalFileName;
+// TQString m_originalFileName;
KexiDropDownButton *m_chooser;
KexiImageContextMenu *m_popupMenu;
//moved KActionCollection m_actionCollection;
//moved KAction *m_insertFromFileAction, *m_saveAsAction, *m_cutAction, *m_copyAction, *m_pasteAction,
// *m_deleteAction, *m_propertiesAction;
-// QTimer m_clickTimer;
- int m_alignment;
- FocusPolicy m_focusPolicyInternal; //!< Used for focusPolicyInternal()
+// TQTimer m_clickTimer;
+ int m_tqalignment;
+ TQ_FocusPolicy m_focusPolicyInternal; //!< Used for focusPolicyInternal()
bool m_designMode : 1;
bool m_readOnly : 1;
bool m_scaledContents : 1;