Eneboo - Documentación para desarrolladores
src/qt/tools/designer/designer/customwidgeteditorimpl.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 CUSTOMWIDGETEDITORIMPL_H
00028 #define CUSTOMWIDGETEDITORIMPL_H
00029 
00030 #include "customwidgeteditor.h"
00031 #include "metadatabase.h"
00032 
00033 #include <qmap.h>
00034 #include <qobjectlist.h>
00035 
00036 class QTimer;
00037 class QListBoxItem;
00038 class MainWindow;
00039 
00040 class CustomWidgetEditor : public CustomWidgetEditorBase
00041 {
00042     Q_OBJECT
00043 
00044 public:
00045     CustomWidgetEditor( QWidget *parent , MainWindow *mw);
00046 
00047 protected slots:
00048     void addWidgetClicked();
00049     void classNameChanged( const QString & );
00050     void currentWidgetChanged( QListBoxItem * );
00051     void deleteWidgetClicked();
00052     void headerFileChanged( const QString & );
00053     void heightChanged( int );
00054     void includePolicyChanged( int );
00055     void pixmapChoosen();
00056     void widthChanged( int );
00057     void chooseHeader();
00058     void checkWidgetName();
00059     void closeClicked();
00060     void currentSignalChanged( QListBoxItem *i );
00061     void addSignal();
00062     void removeSignal();
00063     void signalNameChanged( const QString &s );
00064     void slotAccessChanged( const QString & );
00065     void slotNameChanged( const QString & );
00066     void addSlot();
00067     void removeSlot();
00068     void currentSlotChanged( QListViewItem * );
00069     void propertyTypeChanged( const QString & );
00070     void propertyNameChanged( const QString & );
00071     void addProperty();
00072     void removeProperty();
00073     void currentPropertyChanged( QListViewItem * );
00074     void saveDescription();
00075     void loadDescription();
00076     void horDataChanged( int );
00077     void verDataChanged( int );
00078     void widgetIsContainer( bool );
00079     
00080 private:
00081     MetaDataBase::CustomWidget *findWidget( QListBoxItem *i );
00082     void setupDefinition();
00083     void setupSignals();
00084     void setupSlots();
00085     void setupProperties();
00086     void updateCustomWidgetSizes();
00087 
00088 private:
00089     QMap<QListBoxItem*, MetaDataBase::CustomWidget*> customWidgets;
00090     QString oldName;
00091     QTimer *checkTimer;
00092     QListBoxItem *oldItem;
00093     MainWindow *mainWindow;
00094     QObjectList cwLst;
00095 
00096 };
00097 
00098 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'