#ifndef SYSTEMAPI_H #define SYSTEMAPI_H #include <QObject> #include <QVariant> #include <QString> #include <QStringList> #include <QThread> #include <QtConcurrentRun> #include <QFuture> #include <QFutureWatcher> class SystemApi : public QObject { Q_OBJECT public: explicit SystemApi(){} // file/dir i/o api Q_INVOKABLE QVariant readFile(const QString& fname); Q_INVOKABLE bool createFile(const QString& filename, const QString& fileContents); Q_INVOKABLE bool setCurrentDir(const QString& dir); Q_INVOKABLE QString currentDir(); Q_INVOKABLE QString applicationPath(); Q_INVOKABLE QString selectDirectory(); Q_INVOKABLE QString selectFile(const QString& caption, const QString& dir); Q_INVOKABLE QStringList selectFiles(const QString& caption, const QString& dir); Q_INVOKABLE QVariant ls(const QString& dirname); Q_INVOKABLE QVariant ls(const QString& dirname, bool fileInfo); Q_INVOKABLE QString startProcess(const QString& program, const QStringList& arguments); Q_INVOKABLE void startDetached(const QString& program, const QStringList& arguments, const QString& workingDirectory); Q_INVOKABLE bool openUrlInBrowser(QString str); // This is useful for opening, e.g., a help page (opens in system default browser) Q_INVOKABLE QVariant getSystemLocale(); private: signals: private slots: }; #endif // SYSTEMAPI_H
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 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>) |
||
#2 | 8107 | David George |
a little cleanup / bug squashing. Not much to see here. createP4 method now added directly to p4 object (rather than through proto) removing some methods that were only used for development debugging/testing |
||
#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) |