Eneboo - Documentación para desarrolladores
src/qt/tools/designer/designer/propertyeditor.h
Ir a la documentación de este archivo.
00001 /**********************************************************************
00002 ** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
00003 **
00004 ** This file is part of Qt Designer.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00012 ** licenses may use this file in accordance with the Qt Commercial License
00013 ** Agreement provided with the Software.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00019 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00020 **   information about Qt Commercial License Agreements.
00021 **
00022 ** Contact info@trolltech.com if any conditions of this licensing are
00023 ** not clear to you.
00024 **
00025 **********************************************************************/
00026 
00027 #ifndef PROPERTYEDITOR_H
00028 #define PROPERTYEDITOR_H
00029 
00030 #include <qfeatures.h>
00031 #include <qvariant.h>
00032 #include <qlistview.h>
00033 #include <qptrlist.h>
00034 #include <qguardedptr.h>
00035 #include <qtabwidget.h>
00036 #include <qmodules.h>
00037 #include <qptrlist.h>
00038 #include <qlayout.h>
00039 #include <qcheckbox.h>
00040 #include <qcombobox.h>
00041 #include "hierarchyview.h"
00042 #include "metadatabase.h"
00043 
00044 class PropertyList;
00045 class PropertyEditor;
00046 class QPainter;
00047 class QColorGroup;
00048 class QLineEdit;
00049 class QPushButton;
00050 class QHBox;
00051 class QSpinBox;
00052 class QLabel;
00053 class QFrame;
00054 class FormWindow;
00055 class QCloseEvent;
00056 class QResizeEvent;
00057 class PropertyWhatsThis;
00058 class QDateEdit;
00059 class QTimeEdit;
00060 class QDateTimeEdit;
00061 
00062 class PropertyItem : public QListViewItem
00063 {
00064 public:
00065     PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
00066     ~PropertyItem();
00067 
00068     void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align );
00069     void paintBranches( QPainter * p, const QColorGroup & cg,
00070                         int w, int y, int h );
00071     void paintFocus( QPainter *p, const QColorGroup &cg, const QRect &r );
00072 
00073     virtual bool hasSubItems() const;
00074     virtual void createChildren();
00075     virtual void initChildren();
00076 
00077     bool isOpen() const;
00078     void setOpen( bool b );
00079 
00080     virtual void showEditor();
00081     virtual void hideEditor();
00082 
00083     virtual void setValue( const QVariant &v );
00084     QVariant value() const;
00085     QString name() const;
00086     virtual void notifyValueChange();
00087 
00088     virtual void setChanged( bool b, bool updateDb = TRUE );
00089     bool isChanged() const;
00090 
00091     virtual void placeEditor( QWidget *w );
00092 
00093     virtual PropertyItem *propertyParent() const;
00094     virtual void childValueChanged( PropertyItem *child );
00095 
00096     void addChild( PropertyItem *i );
00097     int childCount() const;
00098     PropertyItem *child( int i ) const;
00099 
00100     virtual bool hasCustomContents() const;
00101     virtual void drawCustomContents( QPainter *p, const QRect &r );
00102 
00103     void updateBackColor();
00104 
00105     void setup() { QListViewItem::setup(); setHeight( QListViewItem::height() + 2 ); }
00106 
00107     virtual QString currentItem() const;
00108     virtual int currentIntItem() const;
00109     virtual void setCurrentItem( const QString &s );
00110     virtual void setCurrentItem( int i );
00111     virtual int currentIntItemFromObject() const;
00112     virtual QString currentItemFromObject() const;
00113 
00114     void setFocus( QWidget *w );
00115 
00116     virtual void toggle();
00117     void setText( int col, const QString &txt );
00118 
00119 protected:
00120     PropertyList *listview;
00121     QVariant val;
00122 
00123 private:
00124     QColor backgroundColor();
00125     void createResetButton();
00126     void updateResetButtonState();
00127 
00128 private:
00129     bool open, changed;
00130     PropertyItem *property;
00131     QString propertyName;
00132     QPtrList<PropertyItem> children;
00133     QColor backColor;
00134     QPushButton *resetButton;
00135 
00136 };
00137 
00138 class PropertyTextItem : public QObject,
00139                          public PropertyItem
00140 {
00141     Q_OBJECT
00142 
00143 public:
00144     PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00145                       const QString &propName, bool comment, bool multiLine, bool ascii = FALSE, bool a = FALSE );
00146     ~PropertyTextItem();
00147 
00148     virtual void createChildren();
00149     virtual void initChildren();
00150 
00151     virtual void showEditor();
00152     virtual void hideEditor();
00153 
00154     virtual void setValue( const QVariant &v );
00155     virtual bool hasSubItems() const;
00156     virtual void childValueChanged( PropertyItem *child );
00157 
00158     virtual void setChanged( bool b, bool updateDb = TRUE );
00159 
00160 private slots:
00161     void setValue();
00162     void getText();
00163 
00164 private:
00165     QLineEdit *lined();
00166     QGuardedPtr<QLineEdit> lin;
00167     QGuardedPtr<QHBox> box;
00168     QPushButton *button;
00169     bool withComment, hasMultiLines, asciiOnly, accel;
00170 
00171 };
00172 
00173 
00174 class PropertyBoolItem : public QObject,
00175                          public PropertyItem
00176 {
00177     Q_OBJECT
00178 
00179 public:
00180     PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
00181     ~PropertyBoolItem();
00182 
00183     virtual void showEditor();
00184     virtual void hideEditor();
00185 
00186     virtual void setValue( const QVariant &v );
00187     virtual void toggle();
00188 
00189 private slots:
00190     void setValue();
00191 
00192 private:
00193     QComboBox *combo();
00194     QGuardedPtr<QComboBox> comb;
00195 
00196 };
00197 
00198 class PropertyIntItem : public QObject,
00199                         public PropertyItem
00200 {
00201     Q_OBJECT
00202 
00203 public:
00204     PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00205                      const QString &propName, bool s );
00206     ~PropertyIntItem();
00207 
00208     virtual void showEditor();
00209     virtual void hideEditor();
00210 
00211     virtual void setValue( const QVariant &v );
00212 
00213 private slots:
00214     void setValue();
00215 
00216 private:
00217     QSpinBox *spinBox();
00218     QGuardedPtr<QSpinBox> spinBx;
00219     bool signedValue;
00220 
00221 };
00222 
00223 class PropertyLayoutItem : public QObject,
00224                         public PropertyItem
00225 {
00226     Q_OBJECT
00227 
00228 public:
00229     PropertyLayoutItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00230                         const QString &propName );
00231     ~PropertyLayoutItem();
00232 
00233     virtual void showEditor();
00234     virtual void hideEditor();
00235 
00236     virtual void setValue( const QVariant &v );
00237 
00238 private slots:
00239     void setValue();
00240 
00241 private:
00242     QSpinBox *spinBox();
00243     QGuardedPtr<QSpinBox> spinBx;
00244 
00245 };
00246 
00247 class PropertyDoubleItem : public QObject,
00248                         public PropertyItem
00249 {
00250     Q_OBJECT
00251 
00252 public:
00253     PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00254                      const QString &propName );
00255     ~PropertyDoubleItem();
00256 
00257     virtual void showEditor();
00258     virtual void hideEditor();
00259 
00260     virtual void setValue( const QVariant &v );
00261 
00262 private slots:
00263     void setValue();
00264 
00265 private:
00266     QLineEdit *lined();
00267     QGuardedPtr<QLineEdit> lin;
00268 };
00269 
00270 class PropertyListItem : public QObject,
00271                          public PropertyItem
00272 {
00273     Q_OBJECT
00274 
00275 public:
00276     PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00277                       const QString &propName, bool editable );
00278     ~PropertyListItem();
00279 
00280     virtual void showEditor();
00281     virtual void hideEditor();
00282 
00283     virtual void setValue( const QVariant &v );
00284 
00285     QString currentItem() const;
00286     int currentIntItem() const;
00287     void setCurrentItem( const QString &s );
00288     void setCurrentItem( int i );
00289     int currentIntItemFromObject() const;
00290     QString currentItemFromObject() const;
00291     void addItem( const QString &s );
00292 
00293 private slots:
00294     void setValue();
00295 
00296 private:
00297     QComboBox *combo();
00298     QGuardedPtr<QComboBox> comb;
00299     int oldInt;
00300     bool editable;
00301     QString oldString;
00302 
00303 };
00304 
00305 class PropertyFontItem : public QObject,
00306                          public PropertyItem
00307 {
00308     Q_OBJECT
00309 
00310 public:
00311     PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
00312     ~PropertyFontItem();
00313 
00314     virtual void createChildren();
00315     virtual void initChildren();
00316 
00317     virtual void showEditor();
00318     virtual void hideEditor();
00319 
00320     virtual void setValue( const QVariant &v );
00321     virtual bool hasSubItems() const;
00322     virtual void childValueChanged( PropertyItem *child );
00323 
00324 private slots:
00325     void getFont();
00326 
00327 private:
00328     QGuardedPtr<QLineEdit> lined;
00329     QGuardedPtr<QPushButton> button;
00330     QGuardedPtr<QHBox> box;
00331 
00332 };
00333 
00334 class PropertyCoordItem : public QObject,
00335                           public PropertyItem
00336 {
00337     Q_OBJECT
00338 
00339 public:
00340     enum Type { Rect, Size, Point };
00341 
00342     PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00343                        const QString &propName, Type t );
00344     ~PropertyCoordItem();
00345 
00346     virtual void createChildren();
00347     virtual void initChildren();
00348 
00349     virtual void showEditor();
00350     virtual void hideEditor();
00351 
00352     virtual void setValue( const QVariant &v );
00353     virtual bool hasSubItems() const;
00354     virtual void childValueChanged( PropertyItem *child );
00355 
00356 private:
00357     QLineEdit *lined();
00358     QGuardedPtr<QLineEdit> lin;
00359     Type typ;
00360 
00361 };
00362 
00363 class PropertyColorItem : public QObject,
00364                           public PropertyItem
00365 {
00366     Q_OBJECT
00367 
00368 public:
00369     PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00370                        const QString &propName, bool children );
00371     ~PropertyColorItem();
00372 
00373     virtual void createChildren();
00374     virtual void initChildren();
00375 
00376     virtual void showEditor();
00377     virtual void hideEditor();
00378 
00379     virtual void setValue( const QVariant &v );
00380     virtual bool hasSubItems() const;
00381     virtual void childValueChanged( PropertyItem *child );
00382 
00383     virtual bool hasCustomContents() const;
00384     virtual void drawCustomContents( QPainter *p, const QRect &r );
00385 
00386 private slots:
00387     void getColor();
00388 
00389 private:
00390     QGuardedPtr<QHBox> box;
00391     QGuardedPtr<QFrame> colorPrev;
00392     QGuardedPtr<QPushButton> button;
00393     bool withChildren;
00394 
00395 };
00396 
00397 class PropertyPixmapItem : public QObject,
00398                            public PropertyItem
00399 {
00400     Q_OBJECT
00401 
00402 public:
00403     enum Type { Pixmap, IconSet, Image };
00404 
00405     PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00406                         const QString &propName, Type t );
00407     ~PropertyPixmapItem();
00408 
00409     virtual void showEditor();
00410     virtual void hideEditor();
00411 
00412     virtual void setValue( const QVariant &v );
00413 
00414     virtual bool hasCustomContents() const;
00415     virtual void drawCustomContents( QPainter *p, const QRect &r );
00416 
00417 private slots:
00418     void getPixmap();
00419 
00420 private:
00421     QGuardedPtr<QHBox> box;
00422     QGuardedPtr<QLabel> pixPrev;
00423     QPushButton *button;
00424     Type type;
00425 
00426 };
00427 
00428 
00429 class PropertySizePolicyItem : public QObject,
00430                           public PropertyItem
00431 {
00432     Q_OBJECT
00433 
00434 public:
00435     PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00436                             const QString &propName );
00437     ~PropertySizePolicyItem();
00438 
00439     virtual void createChildren();
00440     virtual void initChildren();
00441 
00442     virtual void showEditor();
00443     virtual void hideEditor();
00444 
00445     virtual void setValue( const QVariant &v );
00446     virtual bool hasSubItems() const;
00447     virtual void childValueChanged( PropertyItem *child );
00448 
00449 private:
00450     QLineEdit *lined();
00451     QGuardedPtr<QLineEdit> lin;
00452 
00453 };
00454 
00455 class PropertyPaletteItem : public QObject,
00456                             public PropertyItem
00457 {
00458     Q_OBJECT
00459 
00460 public:
00461     PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00462                         const QString &propName );
00463     ~PropertyPaletteItem();
00464 
00465     virtual void showEditor();
00466     virtual void hideEditor();
00467 
00468     virtual void setValue( const QVariant &v );
00469 
00470     virtual bool hasCustomContents() const;
00471     virtual void drawCustomContents( QPainter *p, const QRect &r );
00472 
00473 private slots:
00474     void getPalette();
00475 
00476 private:
00477     QGuardedPtr<QHBox> box;
00478     QGuardedPtr<QLabel> palettePrev;
00479     QGuardedPtr<QPushButton> button;
00480 
00481 };
00482 
00483 class PropertyCursorItem : public QObject,
00484                            public PropertyItem
00485 {
00486     Q_OBJECT
00487 
00488 public:
00489     PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00490                         const QString &propName );
00491     ~PropertyCursorItem();
00492 
00493     virtual void showEditor();
00494     virtual void hideEditor();
00495 
00496     virtual void setValue( const QVariant &v );
00497 
00498 private slots:
00499     void setValue();
00500 
00501 private:
00502     QComboBox *combo();
00503     QGuardedPtr<QComboBox> comb;
00504 
00505 };
00506 
00507 class PropertyKeysequenceItem : public QObject,
00508                                 public PropertyItem
00509 {
00510     Q_OBJECT
00511 
00512 public:
00513     PropertyKeysequenceItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00514                              const QString &propName );
00515     ~PropertyKeysequenceItem();
00516 
00517     virtual void showEditor();
00518     virtual void hideEditor();
00519 
00520     virtual void setValue( const QVariant &v );
00521 
00522 private slots:
00523     void setValue();
00524 
00525 private:
00526     bool eventFilter( QObject *o, QEvent *e );
00527     void handleKeyEvent( QKeyEvent *e );
00528     int translateModifiers( int state );
00529 
00530     QGuardedPtr<QLineEdit> sequence;
00531     QGuardedPtr<QHBox> box;
00532     int k1,k2,k3,k4;
00533     int num;
00534     bool mouseEnter;
00535 };
00536 
00537 class PropertyDatabaseItem : public QObject,
00538                              public PropertyItem
00539 {
00540     Q_OBJECT
00541 
00542 public:
00543     PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName, bool wField );
00544     ~PropertyDatabaseItem();
00545 
00546     virtual void createChildren();
00547     virtual void initChildren();
00548 
00549     virtual void showEditor();
00550     virtual void hideEditor();
00551 
00552     virtual void setValue( const QVariant &v );
00553     virtual bool hasSubItems() const;
00554     virtual void childValueChanged( PropertyItem *child );
00555 
00556 private:
00557     QGuardedPtr<QLineEdit> lined;
00558     QGuardedPtr<QPushButton> button;
00559     QGuardedPtr<QHBox> box;
00560     bool withField;
00561 
00562 };
00563 
00564 struct EnumItem {
00565     EnumItem( const QString &k, bool s )
00566         : key( k ), selected( s ) {}
00567     EnumItem() : key( QString::null ), selected( FALSE ) {}
00568     bool operator==( const EnumItem &item ) const {
00569         return key == item.key;
00570     }
00571     QString key;
00572     bool selected;
00573 };
00574 
00575 class EnumPopup : public QFrame
00576 {
00577     Q_OBJECT
00578 
00579 public:
00580     EnumPopup( QWidget *parent, const char *name, WFlags f=0 );
00581     ~EnumPopup();
00582     void insertEnums( QValueList<EnumItem> lst );
00583     QValueList<EnumItem> enumList() const;
00584     void closeWidget();
00585 
00586 signals:
00587     void closed();
00588     void hidden();
00589 
00590 protected:
00591     void keyPressEvent( QKeyEvent *e );
00592 
00593 private:
00594     QValueList<EnumItem> itemList;
00595     QPtrList<QCheckBox> checkBoxList;
00596     QVBoxLayout *popLayout;
00597 };
00598 
00599 class EnumBox : public QComboBox
00600 {
00601     Q_OBJECT
00602 
00603 public:
00604     EnumBox( QWidget *parent, const char *name = 0 );
00605     ~EnumBox() {}
00606     void setText( const QString &text );
00607     void insertEnums( QValueList<EnumItem> lst );
00608     QValueList<EnumItem> enumList() const;
00609 
00610 signals:
00611     void aboutToShowPopup();
00612     void valueChanged();
00613 
00614 protected:
00615     void paintEvent( QPaintEvent * );
00616     void mousePressEvent( QMouseEvent *e );
00617     void keyPressEvent( QKeyEvent *e );
00618 
00619 protected slots:
00620     void restoreArrow();
00621     void popupHidden();
00622     void popupClosed();
00623 
00624 private:
00625     void popup();
00626     bool arrowDown;
00627     QString str;
00628     bool popupShown;
00629     EnumPopup *pop;
00630 
00631 };
00632 class PropertyEnumItem : public QObject,
00633                          public PropertyItem
00634 {
00635     Q_OBJECT
00636 
00637 public:
00638     PropertyEnumItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
00639                       const QString &propName );
00640     ~PropertyEnumItem();
00641 
00642     void showEditor();
00643     void hideEditor();
00644     void setValue( const QVariant &v );
00645     QString currentItem() const;
00646     QString currentItemFromObject() const;
00647     void setCurrentValues( QStrList lst );
00648 
00649 private slots:
00650     void setValue();
00651     void insertEnums();
00652 
00653 private:
00654     QGuardedPtr<EnumBox> box;
00655     QValueList<EnumItem> enumList;
00656     QString enumString;
00657 };
00658 
00659 class PropertyList : public QListView
00660 {
00661     Q_OBJECT
00662 
00663 public:
00664     PropertyList( PropertyEditor *e );
00665 
00666     virtual void setupProperties();
00667 
00668     virtual void setCurrentItem( QListViewItem *i );
00669     virtual void valueChanged( PropertyItem *i );
00670     virtual void refetchData();
00671     virtual void setPropertyValue( PropertyItem *i );
00672     virtual void setCurrentProperty( const QString &n );
00673 
00674     void layoutInitValue( PropertyItem *i, bool changed = FALSE );
00675     PropertyEditor *propertyEditor() const;
00676     QString whatsThisAt( const QPoint &p );
00677     void showCurrentWhatsThis();
00678 
00679     enum LastEventType { KeyEvent, MouseEvent };
00680     LastEventType lastEvent();
00681 
00682 public slots:
00683     void updateEditorSize();
00684     void resetProperty();
00685     void toggleSort();
00686 
00687 private slots:
00688     void itemPressed( QListViewItem *i, const QPoint &p, int c );
00689     void toggleOpen( QListViewItem *i );
00690     bool eventFilter( QObject *o, QEvent *e );
00691 
00692 protected:
00693     void resizeEvent( QResizeEvent *e );
00694     void paintEmptyArea( QPainter *p, const QRect &r );
00695     bool addPropertyItem( PropertyItem *&item, const QCString &name, QVariant::Type t );
00696 
00697     void viewportDragEnterEvent( QDragEnterEvent * );
00698     void viewportDragMoveEvent ( QDragMoveEvent * );
00699     void viewportDropEvent ( QDropEvent * );
00700 
00701 protected:
00702     PropertyEditor *editor;
00703 
00704 private:
00705     void readPropertyDocs();
00706     void setupCusWidgetProperties( MetaDataBase::CustomWidget *cw,
00707                                    QMap<QString, bool> &unique,
00708                                    PropertyItem *&item );
00709     QString whatsThisText( QListViewItem *i );
00710 
00711 private:
00712     PropertyListItem* pressItem;
00713     QPoint pressPos;
00714     bool mousePressed;
00715     bool showSorted;
00716     QMap<QString, QString> propertyDocs;
00717     PropertyWhatsThis *whatsThis;
00718     LastEventType theLastEvent;
00719 };
00720 
00721 class EventList : public HierarchyList
00722 {
00723     Q_OBJECT
00724 
00725 public:
00726     EventList( QWidget *parent, FormWindow *fw, PropertyEditor *e );
00727 
00728     void setup();
00729     void setCurrent( QWidget *w );
00730 
00731 protected:
00732     void contentsMouseDoubleClickEvent( QMouseEvent *e );
00733 
00734 private:
00735     void save( QListViewItem *p );
00736 
00737 private slots:
00738     void objectClicked( QListViewItem *i );
00739     void showRMBMenu( QListViewItem *, const QPoint & );
00740     void renamed( QListViewItem *i );
00741 
00742 private:
00743     PropertyEditor *editor;
00744 
00745 };
00746 
00747 
00748 class PropertyEditor : public QTabWidget
00749 {
00750     Q_OBJECT
00751 
00752 public:
00753     PropertyEditor( QWidget *parent );
00754 
00755     QObject *widget() const;
00756 
00757     void clear();
00758     void setup();
00759 
00760     void emitWidgetChanged();
00761     void refetchData();
00762 
00763     void closed( FormWindow *w );
00764 
00765     PropertyList *propertyList() const;
00766     FormWindow *formWindow() const;
00767     EventList *eventList() const;
00768 
00769     QString currentProperty() const;
00770     QString classOfCurrentProperty() const;
00771     QMetaObject* metaObjectOfCurrentProperty() const;
00772 
00773     void resetFocus();
00774 
00775     void setPropertyEditorEnabled( bool b );
00776     void setSignalHandlersEnabled( bool b );
00777 
00778 signals:
00779     void hidden();
00780 
00781 public slots:
00782     void setWidget( QObject *w, FormWindow *fw );
00783 
00784 protected:
00785     void closeEvent( QCloseEvent *e );
00786 
00787 private:
00788     void updateWindow();
00789 
00790 private:
00791     QObject *wid;
00792     PropertyList *listview;
00793     EventList *eList;
00794     FormWindow *formwindow;
00795 
00796 };
00797 
00798 class PropertyDateItem : public QObject,
00799                          public PropertyItem
00800 {
00801     Q_OBJECT
00802 
00803 public:
00804     PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
00805     ~PropertyDateItem();
00806 
00807     virtual void showEditor();
00808     virtual void hideEditor();
00809 
00810     virtual void setValue( const QVariant &v );
00811 
00812 private slots:
00813     void setValue();
00814 
00815 private:
00816     QDateEdit *lined();
00817     QGuardedPtr<QDateEdit> lin;
00818 
00819 };
00820 
00821 class PropertyTimeItem : public QObject,
00822                          public PropertyItem
00823 {
00824     Q_OBJECT
00825 
00826 public:
00827     PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
00828     ~PropertyTimeItem();
00829 
00830     virtual void showEditor();
00831     virtual void hideEditor();
00832 
00833     virtual void setValue( const QVariant &v );
00834 
00835 private slots:
00836     void setValue();
00837 
00838 private:
00839     QTimeEdit *lined();
00840     QGuardedPtr<QTimeEdit> lin;
00841 
00842 };
00843 
00844 class PropertyDateTimeItem : public QObject,
00845                          public PropertyItem
00846 {
00847     Q_OBJECT
00848 
00849 public:
00850     PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const QString &propName );
00851     ~PropertyDateTimeItem();
00852 
00853     virtual void showEditor();
00854     virtual void hideEditor();
00855 
00856     virtual void setValue( const QVariant &v );
00857 
00858 private slots:
00859     void setValue();
00860 
00861 private:
00862     QDateTimeEdit *lined();
00863     QGuardedPtr<QDateTimeEdit> lin;
00864 
00865 };
00866 
00867 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'