14 #include <QtCore/QSettings>
15 #include <QtCore/QFileInfo>
17 #if QT_VERSION >= 0x050000
18 #include <QtWidgets/QApplication>
20 #include <QtGui/QApplication>
25 #include "jocassview_version.h"
29 int main(
int argc,
char *argv[])
32 QCoreApplication::setOrganizationName(
"CFEL-ASG");
33 QCoreApplication::setOrganizationDomain(
"endstation.asg.cfel.de");
34 QCoreApplication::setApplicationName(
"jocassview");
36 QApplication::setWindowIcon(
QIcon(
":images/mpg.svg"));
43 std::string filename(
"nofile");
44 parser.
add(
"-f",
"filename of file that one wants to open",filename);
45 std::string key(
"empty");
46 parser.
add(
"--h5key",
"key of the datafield in the hdf5 file",key);
47 bool showUsage(
false);
48 parser.
add(
"-h",
"show this help",showUsage);
49 bool showVersion(
false);
50 parser.
add(
"--version",
"display the version of jocassview",showVersion);
52 parser.
add(
"--restore",
"restore the previous session",restore);
66 std::cout <<VERSION <<std::endl;
75 for (QStringList::ConstIterator it = viewers.begin(); it != viewers.end(); ++it)
81 if ( filename ==
"nofile")
87 if (keyname ==
"empty")
92 jocassviewer.
openFile(fname,keyname);
contains the jocassviewer class
void startViewer()
start the viewer
void usage()
output which commandline parameters are available
int main(int argc, char *argv[])
fromStdString(const std::string &str)
contains a parser for command line parameters
void openFile(QString filename=QString(), QString key=QString())
load data from a file
void setDisplayedItem(QString itemName, bool state, bool simulateClickedSignal=true)
check an item in the list
void add(const std::string &sw, const std::string &desc, bool &val)
add a switch to the switches container
void refreshDisplayableItemsList()
refresh the items on the displayable list
command line argument parser
value(const QString &key, const QVariant &defaultValue=QVariant()