summaryrefslogtreecommitdiffstats
path: root/src/JSObject.h
diff options
context:
space:
mode:
authorJonathan Bauer2011-03-07 21:20:00 +0100
committerJonathan Bauer2011-03-07 21:20:00 +0100
commitdad849a0c95aeed383f6ea4b184d7fa46018db0f (patch)
treedaba889e5e14fa2c913161e7600b6a8082bd3ea8 /src/JSObject.h
parentReworked code structure (diff)
downloadfbgui-dad849a0c95aeed383f6ea4b184d7fa46018db0f.tar.gz
fbgui-dad849a0c95aeed383f6ea4b184d7fa46018db0f.tar.xz
fbgui-dad849a0c95aeed383f6ea4b184d7fa46018db0f.zip
first cleanup...
Diffstat (limited to 'src/JSObject.h')
-rw-r--r--src/JSObject.h61
1 files changed, 7 insertions, 54 deletions
diff --git a/src/JSObject.h b/src/JSObject.h
index e700ec8..f54ae39 100644
--- a/src/JSObject.h
+++ b/src/JSObject.h
@@ -10,7 +10,7 @@
#ifndef JSOBJECT_H_
#define JSOBJECT_H_
-#include "fbbrowser.h"
+#include "fbgui.h"
typedef enum
{
@@ -23,8 +23,8 @@ typedef enum
SHOW_DATE
} JSAction;
-class fbbrowser;
-class QWebFrame;
+class fbgui;
+//class QWebFrame;
class JSObject : public QObject
{
Q_OBJECT
@@ -33,70 +33,23 @@ private:
QWebFrame* _parent;
public:
- JSObject(QWebFrame *parent);
+ JSObject(QWebFrame* parent);
virtual ~JSObject();
-// no slots needed. class provides only signals
-// private slots:
-// void performAction(jsAction a);
-
-// define all the needed signals.
-// every action gets its own signal. (the former enum is not needed anymore)
-// the signals will be connected in the fbbrowser class with slots of the fbbrowser class
signals:
- void processAction(QString action);
void requestFile(QString& filename);
- void getMAC();
- void getTime();
void signalQuitAll();
- /*
- // should be the last signal to be emited.
- // Will close the browser and continues the boot sequence
- void closeBrowser();
- // will start the download of all needed files for the following boot sequence
- void startDownload(QString filename);
- // starts the slot which is responsible for extracting the MAC address of the machine
- // the MAC Address will be the parameter of a javascript function which will present it on the webpage
- void getMacAddress();
- // starts the slot which is responsible for extracting the IP address of the machine
- // the IP address will be the parameter of a javascript function which will present it on the webpage
- void getIpAddress();
- // starts the slot which is responsible for extracting the integrated hardware devices of the machine
- // the array of integrated hardware devices will be the parameter of a javascript function which will present // it on the webpage
- void getIntegratedHardwareDevices();
- // starts the slot which is responsible for extracting the usb devices of the machine
- // the array of usb devices will be the parameter of a javascript function which will present it on the webpag
- void getUsbDevices();
- // starts the slot which is responsible for extracting the hard drive devices of the machine
- // the array of hard rive devices will be the parameter of a javascript function which will present it on the // webpag
- void getHardDrives();
- */
public slots:
- /* Slots to commucate with fbbrowser. */
+
void attachToDOM();
+ QString getInfo(QString info);
+ void startDownload(QString filename);
void updateProgressBar(int i);
- void printMAC(QString& macAddress);
- void printTime(QString& time);
-
- /* Slots for calling from within Javascript. */
- void doAction(QString action);
void quitAll();
- void startDownload(QString filename);
- void getMacAddress();
- void showTime();
- void showHelloWorld();
- // Not yet implemented.
- void getSysInfo();
- void getIpAddress();
- void getIntegratedHardwareDevices();
- void getUsbDevices();
- void getHardDrives();
- // for testing reasons
- void showDate();
};
#endif /* JSOBJECT_H_ */