home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / qt3_emx.zip / include / private / qwidgetinterface_p.h < prev    next >
C/C++ Source or Header  |  2001-10-05  |  3KB  |  97 lines

  1.  /**********************************************************************
  2. ** Copyright (C) 2000-2001 Trolltech AS.  All rights reserved.
  3. **
  4. ** This file is part of Qt Designer.
  5. **
  6. ** This file may be distributed and/or modified under the terms of the
  7. ** GNU General Public License version 2 as published by the Free Software
  8. ** Foundation and appearing in the file LICENSE.GPL included in the
  9. ** packaging of this file.
  10. **
  11. ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  12. ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  13. **
  14. ** See http://www.trolltech.com/gpl/ for GPL licensing information.
  15. **
  16. ** Contact info@trolltech.com if any conditions of this licensing are
  17. ** not clear to you.
  18. **
  19. **********************************************************************/
  20.  
  21. #ifndef QWIDGETINTERFACE_H
  22. #define QWIDGETINTERFACE_H
  23.  
  24.  
  25. #ifndef QT_H
  26. #include <private/qcom_p.h>
  27. #include <qiconset.h>
  28. #endif // QT_H
  29.  
  30. #ifndef QT_NO_WIDGETPLUGIN
  31.  
  32. //
  33. //  W A R N I N G
  34. //  -------------
  35. //
  36. // This file is not part of the Qt API.  It exists for the convenience
  37. // of a number of Qt sources files.  This header file may change from
  38. // version to version without notice, or even be removed.
  39. //
  40. // We mean it.
  41. //
  42. //
  43.  
  44. class QWidget;
  45.  
  46. // {55184143-f18f-42c0-a8eb-71c01516019a}
  47. #ifndef IID_QWidgetFactory
  48. #define IID_QWidgetFactory QUuid( 0x55184143, 0xf18f, 0x42c0, 0xa8, 0xeb, 0x71, 0xc0, 0x15, 0x16, 0x1, 0x9a )
  49. #endif
  50.  
  51. /*! To add custom widgets to the Qt Designer, implement that interface
  52.   in your custom widget plugin.
  53.  
  54.   You also have to implement the function featureList() (\sa
  55.   QFeatureListInterface) and return there all widgets (names of it)
  56.   which this interface provides.
  57. */
  58.  
  59. struct QWidgetFactoryInterface : public QFeatureListInterface
  60. {
  61. public:
  62.  
  63.     /*! In the implementation create and return the widget \a widget
  64.       here, use \a parent and \a name when creating the widget */
  65.     virtual QWidget* create( const QString &widget, QWidget* parent = 0, const char* name = 0 ) = 0;
  66.  
  67.     /*! In the implementation return the name of the group of the
  68.       widget \a widget */
  69.     virtual QString group( const QString &widget ) const = 0;
  70.  
  71.     /*! In the implementation return the iconset, which should be used
  72.       in the Qt Designer menubar and toolbar to represent the widget
  73.       \a widget */
  74.     virtual QIconSet iconSet( const QString &widget ) const = 0;
  75.  
  76.     /*! In the implementation return the include file which is needed
  77.       for the widget \a widget in the generated code which uic
  78.       generates. */
  79.     virtual QString includeFile( const QString &widget ) const = 0;
  80.  
  81.     /*! In the implementation return the text which should be
  82.       displayed as tooltip for the widget \a widget */
  83.     virtual QString toolTip( const QString &widget ) const = 0;
  84.  
  85.     /*! In the implementation return the text which should be used for
  86.       what's this help for the widget \a widget. */
  87.     virtual QString whatsThis( const QString &widget ) const = 0;
  88.  
  89.     /*! In the implementation return TRUE here, of the \a widget
  90.       should be able to contain other widget in the Qt Designer, else
  91.       FALSE. */
  92.     virtual bool isContainer( const QString &widget ) const = 0;
  93. };
  94.  
  95. #endif // QT_NO_WIDGETPLUGIN
  96. #endif // QWIDGETINTERFACE_H
  97.