summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-04-11 15:26:40 +0200
committerJonathan Bauer2011-04-11 15:26:40 +0200
commit9254ecb8588906f998bcf5fa973a4df289249ac3 (patch)
treeec2b1ea11e3a8170ec67cdd29db17f3f8203082a /src/main.cpp
parentforgot the close device command (diff)
downloadfbgui-9254ecb8588906f998bcf5fa973a4df289249ac3.tar.gz
fbgui-9254ecb8588906f998bcf5fa973a4df289249ac3.tar.xz
fbgui-9254ecb8588906f998bcf5fa973a4df289249ac3.zip
started inline documentation
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b9643c1..ad86396 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -25,6 +25,13 @@ void printHelp()
int main(int argc, char *argv[])
{
+ // Initialisation of the QApplication:
+ // In QT, every application is composed of two separate
+ // components: the GUI-Client and the GUI-Server.
+ //
+ // The third parameter sets the application as the
+ // GUI-Server (aswell as the GUI-Client).
+
QApplication app(argc, argv, QApplication::GuiServer);
app.setOrganizationName("team_projekt_2011");
app.setApplicationName("prebootGUI");
@@ -34,7 +41,7 @@ int main(int argc, char *argv[])
translator.load(":" + QLocale::system().name());
app.installTranslator(&translator);
- // parse command line arguments
+ // parse command line arguments using getopt
QMap<QString, QString> clOpts;
int longIndex = 0;
static const char *optString = "c:u:d:s:t:D:h";
@@ -94,7 +101,11 @@ int main(int argc, char *argv[])
else
debugMode = -1;
- // look for config file
+ // look for config file either in:
+ // - the path found in the configuration file
+ // - the user's home directory (as .fbgui.conf)
+ // - /etc/fbgui.conf
+
QString configFilePath;
QFileInfo confInfo;
if (clOpts.contains("configFile"))
@@ -137,7 +148,7 @@ int main(int argc, char *argv[])
else
updateInterval = DEFAULT_UPDATE_INTERVAL;
- // sets which file to watch to trigger loading of URL
+ // set which file to watch to trigger loading of URL
if (clOpts.contains("trigger"))
fileToTriggerURL = clOpts.value("trigger");
else if (confFileSettings.contains("default/file_trigger"))