F:/KPlato/koffice/libs/koproperty/editor.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
00003    Copyright (C) 2004 Alexander Dymo <cloudtemple@mskat.net>
00004    Copyright (C) 2004-2006 Jaroslaw Staniek <js@iidea.pl>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KPROPERTY_PROPERTYEDITOR_H
00023 #define KPROPERTY_PROPERTYEDITOR_H
00024 
00025 #include <QPointer>
00026 //Added by qt3to4:
00027 #include <QMouseEvent>
00028 #include <QResizeEvent>
00029 #include <QKeyEvent>
00030 #include <QEvent>
00031 #include <QByteArray>
00032 #include "koproperty_global.h"
00033 
00034 #include <k3listview.h>
00035 
00036 class QSize;
00037 
00038 namespace KoProperty {
00039 
00040 class EditorPrivate;
00041 class Property;
00042 class Set;
00043 class Widget;
00044 class EditorItem;
00045 
00047 
00068 class KOPROPERTY_EXPORT Editor : public K3ListView
00069 {
00070         Q_OBJECT
00071 
00072         public:
00080                 Editor(QWidget *parent=0, bool autoSync=true, const char *name=0);
00081 
00082                 virtual ~Editor();
00083 
00084                 virtual QSize sizeHint() const;
00085                 virtual void setFocus();
00086                 virtual void setSorting( int column, bool ascending = true );
00087 
00088         public slots:
00093                 void changeSet(Set *set, bool preservePrevSelection = false);
00094 
00099                 void changeSet(Set *set, const QByteArray& propertyToSelect);
00100 
00105                 void clear(bool editorOnly = false);
00106 
00108                 void acceptInput();
00109 
00110         signals:
00112                 void propertySetChanged(KoProperty::Set *set);
00113 
00114         protected slots:
00116                 void slotPropertyChanged(KoProperty::Set& set, KoProperty::Property& property);
00117 
00118                 void slotPropertyReset(KoProperty::Set& set, KoProperty::Property& property);
00119 
00121                 void slotWidgetValueChanged(Widget* widget);
00122 
00125                 void slotWidgetAcceptInput(Widget *widget);
00126 
00128                 void slotWidgetRejectInput(Widget *widget);
00129 
00131                 void slotSetWillBeCleared();
00132 
00134                 void slotSetWillBeDeleted();
00135 
00139                 void slotClicked(Q3ListViewItem *item);
00140 
00142                 void undo();
00143 
00144                 void updateEditorGeometry(bool forceUndoButtonSettings = false, bool undoButtonVisible = false);
00145                 void updateEditorGeometry(EditorItem *item, Widget* widget, bool forceUndoButtonSettings = false, bool undoButtonVisible = false);
00146                 void updateGroupLabelsPosition();
00147 
00148                 void hideEditor();
00149 
00150                 void slotCollapsed(Q3ListViewItem *item);
00151                 void slotExpanded(Q3ListViewItem *item);
00152                 void slotColumnSizeChanged(int section);
00153                 void slotColumnSizeChanged(int section, int oldSize, int newSize);
00154                 void slotCurrentChanged(Q3ListViewItem *item);
00155                 void changeSetLater();
00156                 void selectItemLater();
00157         protected:
00161                 Widget *createWidgetForProperty(Property *property, bool changeWidgetProperty=true);
00162 
00164                 void clearWidgetCache();
00165 
00166                 void fill();
00167                 void addItem(const QByteArray &name, EditorItem *parent);
00168 
00169                 void showUndoButton( bool show );
00170 
00171                 virtual void resizeEvent(QResizeEvent *ev);
00172                 virtual bool eventFilter( QObject * watched, QEvent * e );
00173                 bool handleKeyPress(QKeyEvent* ev);
00174 
00175                 virtual bool event( QEvent * e );
00176                 void updateFont();
00177 
00178                 virtual void contentsMousePressEvent( QMouseEvent * e );
00179 
00181                 void changeSetInternal(Set *set, bool preservePrevSelection, 
00182                         const QByteArray& propertyToSelect);
00183 
00184         private:
00185                 EditorPrivate *d;
00186 
00187         friend class EditorItem;
00188         friend class Widget;
00189 };
00190 
00191 }
00192 
00193 #endif

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