#ifndef GUIAPI_H #define GUIAPI_H #include "mainwindow.h" #include "ui_mainwindow.h" #include <QObject> #include <QVariantMap> #include <QStringList> #include <QActionGroup> class GuiApi : public QObject { Q_OBJECT Q_PROPERTY(bool framed READ getFramed WRITE setFramed) Q_PROPERTY(bool transparent READ getTransparent WRITE setTransparent) Q_PROPERTY(bool addressBarVisible READ getAddressBarVisible WRITE setAddressBarVisible) Q_PROPERTY(bool statusBarVisible READ getStatusBarVisible WRITE setStatusBarVisible) Q_PROPERTY(QString windowTitle READ getWindowTitle WRITE setWindowTitle) public: explicit GuiApi(MainWindow* mw = 0); Q_INVOKABLE QVariantMap getGeometry(); Q_INVOKABLE void setGeometry(QVariantMap newGeo); Q_INVOKABLE QObject* _getMW() {return m_MainWindow;} Q_INVOKABLE QVariant promptForConnection(QVariant defaults); Q_INVOKABLE QObject* openNewWindow(); signals: public slots: private: MainWindow* m_MainWindow; bool m_Framed; bool m_Transparent; bool getFramed() {return m_Framed;} void setFramed(bool b); bool getTransparent() {return m_Transparent;} void setTransparent(bool b); bool getAddressBarVisible() {return m_MainWindow->ui->actionAddress_Bar->isChecked();} void setAddressBarVisible(bool b); bool getStatusBarVisible() {return m_MainWindow->ui->actionStatus_Bar->isChecked();} void setStatusBarVisible(bool b); void setWindowTitle(QString windowTitle) {m_MainWindow->setWindowTitle(windowTitle);} QString getWindowTitle() {return m_MainWindow->windowTitle();} }; #endif // GUIAPI_H
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 8115 | David George |
a bunch of changes to the GuiApi - probably bound to change, though, so use at your own risk! beginnings of migrating to an "all windows are created equal" model. (as opposed to a MainWindow) removing the unreliable Qt execution of the .js methods - please include in your HTML (<script type="text/javascript" src="qrc:/js/ClientKitMethods.js"></script>) |
||
#1 | 8101 | David George |
beginning of _massive_ re-factoring your current build settings will fail create a new project from newly added .pro file (but change its p4api paths to match your old one) look for updated README as soon as Dave agrees that changes are _indeed_ for the best (Changes by Jaimen) |