F:/KPlato/koffice/libs/kotext/KoCustomVariablesDia.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KOVARIABLEDLGS_H
00021 #define KOVARIABLEDLGS_H
00022 
00023 #include "KoVariable.h"
00024 
00025 #include <kdialog.h>
00026 #include <q3ptrlist.h>
00027 #include <QString>
00028 //Added by qt3to4:
00029 #include <QResizeEvent>
00030 #include <QCloseEvent>
00031 #include <k3listview.h>
00032 #include <koffice_export.h>
00033 #include <kvbox.h>
00034 class QComboBox;
00035 class KVBox;
00036 class QResizeEvent;
00037 class KLineEdit;
00038 class QCloseEvent;
00039 
00040 /******************************************************************
00041  *
00042  * Class: KoVariableNameDia
00043  *
00044  ******************************************************************/
00045 
00046 class KoVariableNameDia : public KDialog
00047 {
00048     Q_OBJECT
00049 
00050 public:
00051     // For KWMailMergeVariableInsertDia
00052     KoVariableNameDia( QWidget *parent );
00053     // For kwview
00054     KoVariableNameDia( QWidget *parent, const Q3PtrList<KoVariable> &vars );
00055     QString getName() const;
00056 
00057 protected slots:
00058     void textChanged ( const QString &_text );
00059 protected:
00060     void init();
00061 
00062     QComboBox *names;
00063     KVBox *back;
00064 };
00065 
00071 class KoCustomVariablesListItem : public Q3ListViewItem
00072 {
00073 public:
00074     KoCustomVariablesListItem( Q3ListView *parent );
00075 
00076     void setVariable( KoCustomVariable *v );
00077     KoCustomVariable *getVariable() const;
00078 
00079     virtual void setup();
00080     virtual int width ( const QFontMetrics & fm, const Q3ListView * lv, int c ) const;
00081     void update();
00082 
00083     // Gets the value from the lineedit and sets it into the variable
00084     void applyValue();
00085 
00086 protected:
00087     KoCustomVariable *var;
00088     KLineEdit *editWidget;
00089 };
00090 
00096 class KoCustomVariablesList : public K3ListView
00097 {
00098     Q_OBJECT
00099 
00100 public:
00101     KoCustomVariablesList( QWidget *parent );
00102 
00103     void setValues();
00104     void updateItems();
00105 
00106 protected slots:
00107     void columnSizeChange( int c, int os, int ns );
00108     void sectionClicked( int c );
00109 
00110 private:
00111     class Private;
00112     Private* d; // currently unused
00113 };
00114 
00119 class KOTEXT_EXPORT KoCustomVariablesDia : public KDialog
00120 {
00121     Q_OBJECT
00122 
00123 public:
00124     KoCustomVariablesDia( QWidget *parent, const Q3PtrList<KoVariable> &variables );
00125 protected slots:
00126     void slotOk();
00127 
00128 protected:
00129     KVBox *back;
00130     KoCustomVariablesList *list;
00131 
00132 };
00133 
00139 class KOTEXT_EXPORT KoCustomVarDialog : public KDialog
00140 {
00141     Q_OBJECT
00142 
00143 public:
00147     KoCustomVarDialog( QWidget *parent );
00151     KoCustomVarDialog( QWidget *parent, KoCustomVariable *var );
00152 
00153     virtual QString name();
00154     virtual QString value();
00155 
00156 protected slots:
00157     void slotAddOk();
00158     void slotEditOk();
00159     void slotTextChanged(const QString&);
00160 
00161 protected:
00162     KVBox *back;
00163     KLineEdit *m_name;
00164     KLineEdit *m_value;
00165 
00166 private:
00167     void init();
00168     KoCustomVariable *m_var;
00169 };
00170 
00171 #endif

Généré le Wed Nov 22 23:41:07 2006 pour KPlato par  doxygen 1.5.1-p1