koVariableDlgs.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KOVARIABLEDLGS_H
00021 #define KOVARIABLEDLGS_H
00022
00023 #include "kovariable.h"
00024
00025 #include <kdialogbase.h>
00026 #include <qptrlist.h>
00027 #include <qstring.h>
00028 #include <klistview.h>
00029
00030 class QComboBox;
00031 class QVBox;
00032 class QResizeEvent;
00033 class KLineEdit;
00034 class QCloseEvent;
00035
00036
00037
00038
00039
00040
00041
00042 class KoVariableNameDia : public KDialogBase
00043 {
00044 Q_OBJECT
00045
00046 public:
00047
00048 KoVariableNameDia( QWidget *parent );
00049
00050 KoVariableNameDia( QWidget *parent, const QPtrList<KoVariable> &vars );
00051 QString getName() const;
00052
00053 protected slots:
00054 void textChanged ( const QString &_text );
00055 protected:
00056 void init();
00057
00058 QComboBox *names;
00059 QVBox *back;
00060 };
00061
00067 class KoCustomVariablesListItem : public QListViewItem
00068 {
00069 public:
00070 KoCustomVariablesListItem( QListView *parent );
00071
00072 void setVariable( KoCustomVariable *v );
00073 KoCustomVariable *getVariable() const;
00074
00075 virtual void setup();
00076 virtual int width ( const QFontMetrics & fm, const QListView * lv, int c ) const;
00077 void update();
00078
00079
00080 void applyValue();
00081
00082 protected:
00083 KoCustomVariable *var;
00084 KLineEdit *editWidget;
00085 };
00086
00092 class KoCustomVariablesList : public KListView
00093 {
00094 Q_OBJECT
00095
00096 public:
00097 KoCustomVariablesList( QWidget *parent );
00098
00099 void setValues();
00100 void updateItems();
00101
00102 protected slots:
00103 void columnSizeChange( int c, int os, int ns );
00104 void sectionClicked( int c );
00105
00106 private:
00107 class Private;
00108 Private* d;
00109 };
00110
00115 class KoCustomVariablesDia : public KDialogBase
00116 {
00117 Q_OBJECT
00118
00119 public:
00120 KoCustomVariablesDia( QWidget *parent, const QPtrList<KoVariable> &variables );
00121 protected slots:
00122 void slotOk();
00123
00124 protected:
00125 QVBox *back;
00126 KoCustomVariablesList *list;
00127
00128 };
00129
00135 class KoCustomVarDialog : public KDialogBase
00136 {
00137 Q_OBJECT
00138
00139 public:
00143 KoCustomVarDialog( QWidget *parent );
00147 KoCustomVarDialog( QWidget *parent, KoCustomVariable *var );
00148
00149 virtual QString name();
00150 virtual QString value();
00151
00152 protected slots:
00153 void slotAddOk();
00154 void slotEditOk();
00155 void slotTextChanged(const QString&);
00156
00157 protected:
00158 QVBox *back;
00159 KLineEdit *m_name;
00160 KLineEdit *m_value;
00161
00162 private:
00163 void init();
00164 KoCustomVariable *m_var;
00165 };
00166
00167 #endif
This file is part of the documentation for lib Library Version 1.3.5.