Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSMainWindow_p.h 00003 ------------------- 00004 begin : 02/04/2011 00005 copyright : (C) 2003-2011 by InfoSiAL S.L. 00006 email : mail@infosial.com 00007 ***************************************************************************/ 00008 /*************************************************************************** 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; version 2 of the License. * 00012 ***************************************************************************/ 00013 /*************************************************************************** 00014 Este programa es software libre. Puede redistribuirlo y/o modificarlo 00015 bajo los términos de la Licencia Pública General de GNU en su 00016 versión 2, publicada por la Free Software Foundation. 00017 ***************************************************************************/ 00018 00019 #ifndef AQSMAINWINDOW_P_H_ 00020 #define AQSMAINWINDOW_P_H_ 00021 00022 #include "AQSWidget_p.h" 00023 #include <qmainwindow.h> 00024 00025 class AQSMainWindow : public AQSWidget 00026 { 00027 Q_OBJECT 00028 00029 Q_ENUMS(Dock) 00030 00031 AQ_DECLARE_AQS_OBJECT(MainWindow, Widget); 00032 00033 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00034 public slots: 00035 QMenuBar *menuBar() const; 00036 QStatusBar *statusBar() const; 00037 QToolTipGroup *toolTipGroup() const; 00038 virtual void setCentralWidget(QWidget *); 00039 QWidget *centralWidget() const; 00040 virtual void setDockEnabled(Dock, bool); 00041 bool isDockEnabled(Dock) const; 00042 bool isDockEnabled(QDockArea *) const; 00043 virtual void setDockEnabled(QDockWindow *, Dock, bool); 00044 bool isDockEnabled(QDockWindow *, Dock) const; 00045 bool isDockEnabled(QDockWindow *, QDockArea *) const; 00046 virtual void addDockWindow(QDockWindow *, Dock = DockTop, bool = FALSE); 00047 virtual void addDockWindow(QDockWindow *, const QString &, Dock = DockTop, bool = FALSE); 00048 virtual void moveDockWindow(QDockWindow *, Dock = DockTop); 00049 virtual void moveDockWindow(QDockWindow *, Dock, bool, int, int = -1); 00050 virtual void removeDockWindow(QDockWindow *); 00051 bool usesBigPixmaps() const; 00052 bool usesTextLabel() const; 00053 bool dockWindowsMovable() const; 00054 bool opaqueMoving() const; 00055 bool getLocation(QDockWindow *, Dock &, int &, bool &, int &) const; 00056 void lineUpDockWindows(bool = FALSE); 00057 bool isDockMenuEnabled() const; 00058 bool hasDockWindow(QDockWindow *); 00059 QDockArea *leftDock() const; 00060 QDockArea *rightDock() const; 00061 QDockArea *topDock() const; 00062 QDockArea *bottomDock() const; 00063 virtual bool isCustomizable() const; 00064 bool appropriate(QDockWindow *) const; 00065 QPopupMenu *createDockWindowMenu(uint = QMainWindow::AllDockWindows) const; 00066 00067 protected: 00068 static void *construct(const QSArgumentList &args) { 00069 QMap<int, QStringList> candidates; 00070 candidates[0].append(QString::null); 00071 candidates[1].append(QString::fromLatin1("QWidget*")); 00072 candidates[2].append(QString::fromLatin1("QWidget*,QString")); 00073 candidates[3].append(QString::fromLatin1("QWidget*,QString,WFlags")); 00074 QString sgt(castArgsSignature(args, candidates)); 00075 if (sgt.isEmpty()) 00076 return new QMainWindow; 00077 if (sgt == QString::fromLatin1("QWidget*")) 00078 return new QMainWindow(argValue<QWidget *>(args[0])); 00079 if (sgt == QString::fromLatin1("QWidget*,QString")) 00080 return new QMainWindow(argValue<QWidget *>(args[0]), 00081 *(argValue<QString *>(args[1]))); 00082 if (sgt == QString::fromLatin1("QWidget*,QString,WFlags")) 00083 return new QMainWindow(argValue<QWidget *>(args[0]), 00084 *(argValue<QString *>(args[1])), 00085 static_cast<WFlags>(args[2].variant().toUInt())); 00086 return 0; 00087 } 00088 00089 public: 00090 static QMap<int, QStringList> candidateConstructors() { 00091 QMap<int, QStringList> candidates; 00092 candidates[0].append(QString::null); 00093 candidates[1].append(QString::fromLatin1("QWidget*")); 00094 candidates[2].append(QString::fromLatin1("QWidget*,QString")); 00095 candidates[3].append(QString::fromLatin1("QWidget*,QString,WFlags")); 00096 return candidates; 00097 } 00098 //@AQ_END_DEF_PUB_SLOTS@ 00099 }; 00100 00101 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00102 inline QMenuBar *AQSMainWindow::menuBar() const 00103 { 00104 AQ_CALL_RET(menuBar()); 00105 } 00106 inline QStatusBar *AQSMainWindow::statusBar() const 00107 { 00108 AQ_CALL_RET(statusBar()); 00109 } 00110 inline QToolTipGroup *AQSMainWindow::toolTipGroup() const 00111 { 00112 AQ_CALL_RET(toolTipGroup()); 00113 } 00114 inline void AQSMainWindow::setCentralWidget(QWidget *arg0) 00115 { 00116 AQ_CALL_VOID(setCentralWidget(arg0)); 00117 } 00118 inline QWidget *AQSMainWindow::centralWidget() const 00119 { 00120 AQ_CALL_RET(centralWidget()); 00121 } 00122 inline void AQSMainWindow::setDockEnabled(Dock arg0, bool arg1) 00123 { 00124 AQ_CALL_VOID(setDockEnabled(arg0, arg1)); 00125 } 00126 inline bool AQSMainWindow::isDockEnabled(Dock arg0) const 00127 { 00128 AQ_CALL_RET_V(isDockEnabled(arg0), bool); 00129 } 00130 inline bool AQSMainWindow::isDockEnabled(QDockArea *arg0) const 00131 { 00132 AQ_CALL_RET_V(isDockEnabled(arg0), bool); 00133 } 00134 inline void AQSMainWindow::setDockEnabled(QDockWindow *arg0, Dock arg1, bool arg2) 00135 { 00136 AQ_CALL_VOID(setDockEnabled(arg0, arg1, arg2)); 00137 } 00138 inline bool AQSMainWindow::isDockEnabled(QDockWindow *arg0, Dock arg1) const 00139 { 00140 AQ_CALL_RET_V(isDockEnabled(arg0, arg1), bool); 00141 } 00142 inline bool AQSMainWindow::isDockEnabled(QDockWindow *arg0, QDockArea *arg1) const 00143 { 00144 AQ_CALL_RET_V(isDockEnabled(arg0, arg1), bool); 00145 } 00146 inline void AQSMainWindow::addDockWindow(QDockWindow *arg0, Dock arg1, bool arg2) 00147 { 00148 AQ_CALL_VOID(addDockWindow(arg0, arg1, arg2)); 00149 } 00150 inline void AQSMainWindow::addDockWindow(QDockWindow *arg0, const QString &arg1, Dock arg2, bool arg3) 00151 { 00152 AQ_CALL_VOID(addDockWindow(arg0, arg1, arg2, arg3)); 00153 } 00154 inline void AQSMainWindow::moveDockWindow(QDockWindow *arg0, Dock arg1) 00155 { 00156 AQ_CALL_VOID(moveDockWindow(arg0, arg1)); 00157 } 00158 inline void AQSMainWindow::moveDockWindow(QDockWindow *arg0, Dock arg1, bool arg2, int arg3, int arg4) 00159 { 00160 AQ_CALL_VOID(moveDockWindow(arg0, arg1, arg2, arg3, arg4)); 00161 } 00162 inline void AQSMainWindow::removeDockWindow(QDockWindow *arg0) 00163 { 00164 AQ_CALL_VOID(removeDockWindow(arg0)); 00165 } 00166 inline bool AQSMainWindow::usesBigPixmaps() const 00167 { 00168 AQ_CALL_RET_V(usesBigPixmaps(), bool); 00169 } 00170 inline bool AQSMainWindow::usesTextLabel() const 00171 { 00172 AQ_CALL_RET_V(usesTextLabel(), bool); 00173 } 00174 inline bool AQSMainWindow::dockWindowsMovable() const 00175 { 00176 AQ_CALL_RET_V(dockWindowsMovable(), bool); 00177 } 00178 inline bool AQSMainWindow::opaqueMoving() const 00179 { 00180 AQ_CALL_RET_V(opaqueMoving(), bool); 00181 } 00182 inline bool AQSMainWindow::getLocation(QDockWindow *arg0, Dock &arg1, int &arg2, bool &arg3, int &arg4) const 00183 { 00184 AQ_CALL_RET_V(getLocation(arg0, arg1, arg2, arg3, arg4), bool); 00185 } 00186 inline void AQSMainWindow::lineUpDockWindows(bool arg0) 00187 { 00188 AQ_CALL_VOID(lineUpDockWindows(arg0)); 00189 } 00190 inline bool AQSMainWindow::isDockMenuEnabled() const 00191 { 00192 AQ_CALL_RET_V(isDockMenuEnabled(), bool); 00193 } 00194 inline bool AQSMainWindow::hasDockWindow(QDockWindow *arg0) 00195 { 00196 AQ_CALL_RET_V(hasDockWindow(arg0), bool); 00197 } 00198 inline QDockArea *AQSMainWindow::leftDock() const 00199 { 00200 AQ_CALL_RET(leftDock()); 00201 } 00202 inline QDockArea *AQSMainWindow::rightDock() const 00203 { 00204 AQ_CALL_RET(rightDock()); 00205 } 00206 inline QDockArea *AQSMainWindow::topDock() const 00207 { 00208 AQ_CALL_RET(topDock()); 00209 } 00210 inline QDockArea *AQSMainWindow::bottomDock() const 00211 { 00212 AQ_CALL_RET(bottomDock()); 00213 } 00214 inline bool AQSMainWindow::isCustomizable() const 00215 { 00216 AQ_CALL_RET_V(isCustomizable(), bool); 00217 } 00218 inline bool AQSMainWindow::appropriate(QDockWindow *arg0) const 00219 { 00220 AQ_CALL_RET_V(appropriate(arg0), bool); 00221 } 00222 inline QPopupMenu *AQSMainWindow::createDockWindowMenu(uint arg0) const 00223 { 00224 AQ_CALL_RET(createDockWindowMenu(static_cast<QMainWindow::DockWindows>(arg0))); 00225 } 00226 //@AQ_END_IMP_PUB_SLOTS@ 00227 00228 #endif /* AQSMAINWINDOW_P_H_ */ 00229 // @AQSWIDGET@