kexi
kexiblobtableedit.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _KEXIBLOBTABLEEDIT_H_
00022 #define _KEXIBLOBTABLEEDIT_H_
00023
00024 #include <qcstring.h>
00025 #include <qcache.h>
00026
00027 #include "kexitableedit.h"
00028 #include "kexicelleditorfactory.h"
00029
00030 class KTempFile;
00031 class KProcess;
00032 class QTextEdit;
00033
00034 class KexiBlobTableEdit : public KexiTableEdit
00035 {
00036 Q_OBJECT
00037 public:
00038
00039 KexiBlobTableEdit(KexiTableViewColumn &column, QScrollView *parent=0);
00040 virtual ~KexiBlobTableEdit();
00041
00042 bool valueIsNull();
00043 bool valueIsEmpty();
00044
00045 virtual QVariant value();
00046
00047 virtual void clear();
00048 virtual bool cursorAtStart();
00049 virtual bool cursorAtEnd();
00050 protected slots:
00051 void slotFinished(KProcess* p);
00052 void open();
00053 void openWith();
00054 void menu();
00055 void loadFile();
00056 void saveFile();
00057
00058 protected:
00060 virtual void setValueInternal(const QVariant& add, bool removeOld);
00061
00062 QString openWithDlg(const QString& file);
00063
00064 void execute(const QString& app, const QString& file);
00065
00066 KTempFile* m_tempFile;
00067 KProcess* m_proc;
00068 QTextEdit *m_content;
00069 };
00070
00071 KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(KexiBlobEditorFactoryItem)
00072
00073
00074
00075
00076
00077
00080 class KEXIDATATABLE_EXPORT KexiKIconTableEdit : public KexiTableEdit
00081 {
00082 public:
00083 KexiKIconTableEdit(KexiTableViewColumn &column, QScrollView *parent=0);
00084
00085 virtual ~KexiKIconTableEdit();
00086
00088 virtual bool valueIsNull();
00089
00093 virtual bool valueIsEmpty();
00094
00095 virtual QVariant value();
00096
00097 virtual bool cursorAtStart();
00098 virtual bool cursorAtEnd();
00099
00100 virtual void clear();
00101
00102 virtual void setupContents( QPainter *p, bool focused, QVariant val,
00103 QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
00104
00105 protected:
00107 virtual void setValueInternal(const QVariant& add, bool removeOld);
00108
00109 void showHintButton();
00110 void init();
00111
00113 QVariant m_currentValue;
00114
00115 QCache<QPixmap> m_pixmapCache;
00116 };
00117
00118 KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(KexiKIconTableEditorFactoryItem)
00119
00120 #endif
|