23 #include <QApplication>
33 gettimeofday( &tTimeval, 0 ) ;
34 return( (
double)tTimeval.tv_sec + (
double)tTimeval.tv_usec/1000000.0 );
37 int main(
int argc,
char* argv[] )
40 QApplication qApplication( argc, argv );
43 QString __qsSettingsFilename = QDir::homePath()+
CONFDIR_STRING+
"/settings.qvct";
46 __poSettings->
load( __qsSettingsFilename );
53 QString __qsDevicesFilename = QDir::homePath()+
CONFDIR_STRING+
"/devices.qvct";
55 __poDeviceOverlay->
load( __qsDevicesFilename,
true );
61 __poMainWindow->restoreGeometry( QByteArray::fromBase64( __poSettings->
getMainWindowGeometry().toLatin1() ) );
62 __poMainWindow->restoreState( QByteArray::fromBase64( __poSettings->
getMainWindowState().toLatin1() ) );
63 __poMainWindow->show();
64 int __iExit = qApplication.exec();
70 __poDeviceOverlay->
save( __qsDevicesFilename, 0,
true );
75 __poSettings->
save( __qsSettingsFilename );
78 delete __poMainWindow;
void load(const QString &_rqsFilename)
Load a full project's content from the given file.
[UI] Device overlay container
void save(const QString &_rqsFilename, CDevice *_poDevice=0, bool _bApplicationDump=false) const
Save this object's content (device) to the given file (all selected items if no device is given)
CDevice * load(const QString &_rqsFilename, bool _bSilent=false)
Load this object's content from the given file and returns the last loaded device (0 if none)
[UI] Application main window
[UI] Container for the application's settings
void load(const QString &_rqsFilename)
Restore all parameters from the given file.
QString getMainWindowState()
[Misc] Returns the main window state (Base64-encoded binary data)
QString getMainWindowGeometry()
[Misc] Returns the main window geometry (Base64-encoded binary data)
void setMainWindowState(const QString &_rqsMainWindowState)
[Misc] Sets the main window state (Base64-encoded binary data)
void save(const QString &_rqsFilename) const
Store all parameters to the given file.
void setMainWindowGeometry(const QString &_rqsMainWindowGeometry)
[Misc] Sets the main window geometry (Base64-encoded binary data)
static void registerMainWindow(CMainWindow *_poMainWindow)
static CDeviceOverlay * useDeviceOverlay()
static void registerSettings(CSettings *_poSettings)
static CChartTable * useChartTable()
int main(int argc, char *argv[])
double microtime()
Returns the system time with microseconds resolution, in seconds.