summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNils Schwabe2014-03-20 18:47:48 +0100
committerNils Schwabe2014-03-20 18:47:48 +0100
commitf3a0b4d09379e63a26ec410088617fe20d5cd27f (patch)
treee34adf2e0bf92ad5e0e03602c0d6060efbcdbead /src
parentremoved the file and path option for XMLs (diff)
downloadvmchooser2-f3a0b4d09379e63a26ec410088617fe20d5cd27f.tar.gz
vmchooser2-f3a0b4d09379e63a26ec410088617fe20d5cd27f.tar.xz
vmchooser2-f3a0b4d09379e63a26ec410088617fe20d5cd27f.zip
- added tab view
- added filter box
Diffstat (limited to 'src')
-rw-r--r--src/dialog.cpp172
-rw-r--r--src/dialog.h16
-rw-r--r--src/globals.h4
-rw-r--r--src/main.cpp4
-rw-r--r--src/sessiontreemodel.cpp73
-rw-r--r--src/sessiontreemodel.h7
-rw-r--r--src/ui/dialog.ui206
-rw-r--r--src/vsession.cpp4
8 files changed, 333 insertions, 153 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp
index 3adfef6..798d6be 100644
--- a/src/dialog.cpp
+++ b/src/dialog.cpp
@@ -16,7 +16,10 @@
Dialog::Dialog(QWidget *parent)
: QDialog(parent), ui(new Ui::Dialog) {
- model_ = new SessionTreeModel(parent);
+ model_[0] = new SessionTreeModel(parent);
+ model_[1] = new SessionTreeModel(parent);
+ model_[2] = new SessionTreeModel(parent);
+
ui->setupUi(this);
pvsSettings_ = NULL;
@@ -29,7 +32,10 @@ Dialog::Dialog(QWidget *parent)
connect(centerTimer_, SIGNAL(timeout()), this, SLOT(onCenterTimer()));
centerTimer_->start(1000);
- ui->treeView->setModel(model_);
+ activeTab = 0;
+ ui->tabButtonLocal->setChecked(true);
+
+ setListModel(model_[0]);
QObject::connect(ui->treeView->selectionModel(), SIGNAL(currentChanged ( const QModelIndex&, const QModelIndex&)),
this, SLOT(treeView_selectionChanged(const QModelIndex&, const QModelIndex&)));
@@ -37,7 +43,9 @@ Dialog::Dialog(QWidget *parent)
Dialog::~Dialog() {
delete ui;
- delete model_;
+ delete model_[0];
+ delete model_[1];
+ delete model_[2];
}
void Dialog::changeEvent(QEvent *e) {
@@ -83,19 +91,25 @@ void Dialog::on_treeView_activated(QModelIndex index) {
}
}
-void Dialog::addItems(const QList<Session*>& entries, const QString& section) {
- this->model_->addItems(entries, section);
- ui->treeView->expandAll();
+void Dialog::addItems(const QList<Session*>& entries, int tab) {
+ if (tab < 0 || tab > 2) {
+ return;
+ }
+ this->model_[tab]->addItems(entries);
}
-void Dialog::addLabelItem(const QString& label, const QString& section) {
- this->model_->addLabelItem(label, section);
- ui->treeView->expandAll();
+void Dialog::addLabelItem(const QString& label, int tab) {
+ if (tab < 0 || tab > 2) {
+ return;
+ }
+ this->model_[tab]->addLabelItem(label);
}
-void Dialog::removeItem(const QString& name, const QString& section) {
- this->model_->removeItem(name, section);
- ui->treeView->expandAll();
+void Dialog::removeItem(const QString& name, int tab) {
+ if (tab < 0 || tab > 2) {
+ return;
+ }
+ this->model_[tab]->removeItem(name);
}
void Dialog::on_pushButtonAbort_clicked() {
@@ -168,23 +182,25 @@ void Dialog::on_comboBoxOthers_currentIndexChanged(int index) {
bool Dialog::selectSession(const QString& name) {
QModelIndex root(ui->treeView->rootIndex());
- for (int i = 0; i < model_->rowCount(root); ++i) {
- QModelIndex section = model_->index(i, 0, root);
- if (!section.isValid()) break;
- for (int row = 0; row < model_->rowCount(section); ++row) {
- QModelIndex index = model_->index(row, 0, section);
- if (!index.isValid()) break;
-
- SessionTreeItem* item =
- static_cast<SessionTreeItem*>(index.internalPointer());
- const Session* s(item->session());
- if (!s) continue;
- if (s->shortDescription() == name) {
- ui->treeView->selectionModel()
- ->setCurrentIndex(index, QItemSelectionModel::Select);
- return true;
- }
- }
+ for (int k = 0; k <= 2; ++k) {
+ for (int i = 0; i < model_[k]->rowCount(root); ++i) {
+ QModelIndex section = model_[k]->index(i, 0, root);
+ if (!section.isValid()) break;
+ for (int row = 0; row < model_[k]->rowCount(section); ++row) {
+ QModelIndex index = model_[k]->index(row, 0, section);
+ if (!index.isValid()) break;
+
+ SessionTreeItem* item =
+ static_cast<SessionTreeItem*>(index.internalPointer());
+ const Session* s(item->session());
+ if (!s) continue;
+ if (s->shortDescription() == name) {
+ ui->treeView->selectionModel()
+ ->setCurrentIndex(index, QItemSelectionModel::Select);
+ return true;
+ }
+ }
+ }
}
return false;
}
@@ -273,8 +289,8 @@ void Dialog::addSessionsAfterDownload(QNetworkReply* reply) {
if (debugMode) {
qDebug() << "Cannot read backup file " << xml_backup_filename << " either";
}
- this->removeItem(QCoreApplication::instance()->translate("Dialog", "Loading..."),QCoreApplication::instance()->translate("Dialog", "Virtual Sessions"));
- this->addLabelItem(QCoreApplication::instance()->translate("Dialog", "URL Error"), QCoreApplication::instance()->translate("Dialog", "Virtual Sessions"));
+ this->removeItem(QCoreApplication::instance()->translate("Dialog", "Loading..."), 1);
+ this->addLabelItem(QCoreApplication::instance()->translate("Dialog", "URL Error"), 1);
return;
}
@@ -288,7 +304,7 @@ void Dialog::addSessionsAfterDownload(QNetworkReply* reply) {
qSort(sessions.begin(), sessions.end(), myLessThan);
- this->addItems(sessions, QCoreApplication::instance()->translate("Dialog", "Virtual Sessions"));
+ this->addItems(sessions, 1);
} else {
@@ -312,12 +328,12 @@ void Dialog::addSessionsAfterDownload(QNetworkReply* reply) {
const QList<Session*> sessions = VSession::readXmlFile(xml_filename);
- this->removeItem(QCoreApplication::instance()->translate("Dialog", "Loading..."),QCoreApplication::instance()->translate("Dialog", "Virtual Sessions"));
+ this->removeItem(QCoreApplication::instance()->translate("Dialog", "Loading..."), 1);
if (!sessions.isEmpty()) {
- this->addItems(sessions, QCoreApplication::instance()->translate("Dialog", "Virtual Sessions"));
+ this->addItems(sessions, 1);
} else {
- this->addLabelItem(QCoreApplication::instance()->translate("Dialog", "No Items"), QCoreApplication::instance()->translate("Dialog", "Virtual Sessions"));
+ this->addLabelItem(QCoreApplication::instance()->translate("Dialog", "No Items"), 1);
}
}
@@ -327,12 +343,16 @@ void Dialog::treeView_selectionChanged(const QModelIndex& current, const QModelI
const Session* s(item->session());
if (!s) {
+ if (debugMode) {
+ qDebug() << "invalid selection";
+ }
// no valid session has been selected, do nothing
return;
}
if (s->type() == Session::VSESSION) {
const VSession* vs = (VSession*) s;
+
ui->label_name->setText(vs->getAttribute("short_description", "param"));
ui->label_name->setToolTip(vs->getAttribute("short_description", "param"));
@@ -351,3 +371,85 @@ void Dialog::treeView_selectionChanged(const QModelIndex& current, const QModelI
ui->textBrowser->setPlainText(QCoreApplication::instance()->translate("Dialog", "Running on this machine."));
}
}
+
+void Dialog::on_tabButtonLocal_clicked() {
+ onTabButtonChanged(0);
+}
+
+void Dialog::on_tabButtonMyClasses_clicked() {
+ onTabButtonChanged(1);
+}
+
+void Dialog::on_tabButtonAllClasses_clicked() {
+ onTabButtonChanged(2);
+}
+
+void Dialog::onTabButtonChanged(int tab) {
+ if (tab < 0 || tab > 2) {
+ // no valid button
+ return;
+ }
+
+ // give focus to treeView
+ ui->treeView->setFocus();
+
+ // one button needs to be enabled
+ if (this->activeTab == tab) {
+ switch (tab) {
+ case 0: ui->tabButtonLocal->setChecked(true); break;
+ case 1: ui->tabButtonMyClasses->setChecked(true); break;
+ case 2: ui->tabButtonAllClasses->setChecked(true); break;
+ }
+ }
+
+
+ this->activeTab = tab;
+
+ // when button was pressed disable the other buttons
+ if (tab == 0) {
+ ui->tabButtonMyClasses->setChecked(false);
+ ui->tabButtonAllClasses->setChecked(false);
+ } else if (tab == 1) {
+ ui->tabButtonLocal->setChecked(false);
+ ui->tabButtonAllClasses->setChecked(false);
+ } else {
+ ui->tabButtonLocal->setChecked(false);
+ ui->tabButtonMyClasses->setChecked(false);
+ }
+
+ // load the new list
+ setListModel(model_[tab]);
+
+ // reconnect the treeModel
+ QObject::connect(ui->treeView->selectionModel(), SIGNAL(currentChanged ( const QModelIndex&, const QModelIndex&)),
+ this, SLOT(treeView_selectionChanged(const QModelIndex&, const QModelIndex&)));
+}
+
+void Dialog::on_filterEdit_textChanged() {
+ SessionTreeModel *newModel;
+
+ // filter the current model
+ if (ui->filterEdit->text() != "" && ui->filterEdit->text().length() > 2) {
+ newModel = new SessionTreeModel(this);
+ newModel->addItems(this->model_[activeTab]->lookForItem(ui->filterEdit->text()));
+ } else {
+ newModel = model_[activeTab];
+ }
+
+ setListModel(newModel);
+ if (ui->treeView->selectionModel()->selectedRows(0).count() == 0) {
+ ui->treeView->selectionModel()->clearSelection();
+ ui->treeView->selectionModel()->setCurrentIndex(ui->treeView->model()->index(0, 0, ui->treeView->rootIndex()), QItemSelectionModel::Select);
+ }
+ // reconnect the treeModel
+ QObject::connect(ui->treeView->selectionModel(), SIGNAL(currentChanged ( const QModelIndex&, const QModelIndex&)),
+ this, SLOT(treeView_selectionChanged(const QModelIndex&, const QModelIndex&)));
+}
+
+void Dialog::setListModel(QAbstractItemModel *model) {
+ if (ui->treeView->model() == model_[0] || ui->treeView->model() == model_[1] || ui->treeView->model() == model_[2]) {
+ } else {
+ ui->treeView->model()->deleteLater();
+ }
+ ui->treeView->setModel(model);
+}
diff --git a/src/dialog.h b/src/dialog.h
index af795a9..aa2fa30 100644
--- a/src/dialog.h
+++ b/src/dialog.h
@@ -19,9 +19,9 @@ class Dialog : public QDialog {
public:
explicit Dialog(QWidget *parent = 0);
~Dialog();
- void addItems(const QList<Session*>&, const QString& section);
- void addLabelItem(const QString& label, const QString& section);
- void removeItem(const QString& name, const QString& section);
+ void addItems(const QList<Session*>&, int tab);
+ void addLabelItem(const QString& label, int tab);
+ void removeItem(const QString& name, int tab);
bool selectSession(const QString& name);
void selectPreviousSession();
void showSettingsPVS();
@@ -33,13 +33,17 @@ class Dialog : public QDialog {
private:
Ui::Dialog *ui;
- SessionTreeModel *model_;
+ SessionTreeModel *model_[3];
QSettings *pvsSettings_;
QPoint oldCenter_;
QTimer *centerTimer_;
QString autoStartEntry_;
+ int activeTab;
void readPVSSettings();
void writePVSSettings();
+ void onTabButtonChanged(int tab);
+ void configClearButton();
+ void setListModel(QAbstractItemModel *model);
private slots:
void on_comboBoxOthers_currentIndexChanged(int index);
@@ -47,6 +51,10 @@ class Dialog : public QDialog {
void on_pushButtonStart_clicked();
void on_pushButtonAbort_clicked();
void on_treeView_activated(QModelIndex index);
+ void on_tabButtonLocal_clicked();
+ void on_tabButtonMyClasses_clicked();
+ void on_tabButtonAllClasses_clicked();
+ void on_filterEdit_textChanged();
void treeView_selectionChanged(const QModelIndex& current, const QModelIndex&);
void onCenterTimer();
diff --git a/src/globals.h b/src/globals.h
index 8215c19..0b8739c 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -13,8 +13,8 @@
#define VMCHOOSER_SESSION_START_SCRIPT "/opt/openslx/vmchooser/sessionstart"
-#define VMCHOOSER_DEFAULT_WIDTH 800
-#define VMCHOOSER_DEFAULT_HEIGHT 600
+#define VMCHOOSER_DEFAULT_WIDTH 1024
+#define VMCHOOSER_DEFAULT_HEIGHT 768
#define OPENSLXCONFIG "/opt/openslx/config"
diff --git a/src/main.cpp b/src/main.cpp
index 9acc10e..86deb3f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -197,11 +197,11 @@ int main(int argc, char *argv[]) {
if (xsessions.size()) {
qSort(xsessions.begin(), xsessions.end(), myLessThan);
- w.addItems(xsessions, a.translate("Dialog", "X Sessions"));
+ w.addItems(xsessions, 0);
}
if (!vSessionUrl.isEmpty()) {
- w.addLabelItem(a.translate("Dialog", "Loading..."), a.translate("Dialog", "Virtual Sessions"));
+ w.addLabelItem(a.translate("Dialog", "Loading..."), 1);
}
QSettings SLXsettings(OPENSLXCONFIG, QSettings::NativeFormat);
diff --git a/src/sessiontreemodel.cpp b/src/sessiontreemodel.cpp
index 177049d..2078aaa 100644
--- a/src/sessiontreemodel.cpp
+++ b/src/sessiontreemodel.cpp
@@ -150,77 +150,38 @@ QModelIndex SessionTreeModel::parent(const QModelIndex &index) const {
return createIndex(parentItem->row(), 0, parentItem);
}
-void SessionTreeModel::addItems(const QList<Session*>& sessions,
- const QString& section) {
- SessionTreeItem* parentItem;
-
- bool sectionExists = false;
-
- for (int i = 0; i < root_->childCount(); ++i) {
- SessionTreeItem* item = root_->child(i);
- if (item->text() == section) {
- parentItem = item;
- sectionExists = true;
- break;
- }
- }
-
- if (!sectionExists) {
- parentItem = new SessionTreeItem(section, root_);
- root_->appendChild(parentItem);
- }
-
+void SessionTreeModel::addItems(const QList<Session*>& sessions) {
foreach (Session* s, sessions) {
- parentItem->appendChild(new SessionTreeItem(s, parentItem));
+ root_->appendChild(new SessionTreeItem(s, root_));
}
}
-void SessionTreeModel::addLabelItem(const QString& label, const QString& section) {
- SessionTreeItem* parentItem;
-
- bool sectionExists = false;
-
- for (int i = 0; i < root_->childCount(); ++i) {
- SessionTreeItem* item = root_->child(i);
- if (item->text() == section) {
- parentItem = item;
- sectionExists = true;
- break;
- }
- }
-
- if (!sectionExists) {
- parentItem = new SessionTreeItem(section, root_);
- root_->appendChild(parentItem);
- }
-
- parentItem->appendChild(new SessionTreeItem(label, parentItem));
+void SessionTreeModel::addLabelItem(const QString& label) {
+ root_->appendChild(new SessionTreeItem(label, root_));
}
-void SessionTreeModel::removeItem(const QString& name, const QString& section) {
- SessionTreeItem* parentItem;
-
- bool sectionExists = false;
-
+void SessionTreeModel::removeItem(const QString& name) {
for (int i = 0; i < root_->childCount(); ++i) {
SessionTreeItem* item = root_->child(i);
- if (item->text() == section) {
- parentItem = item;
- sectionExists = true;
- break;
+ if (item->text() == name) {
+ root_->removeChild(item);
}
}
+}
+
+QList<Session*> SessionTreeModel::lookForItem(const QString& label) {
+ QList<Session*> result;
- if (sectionExists) {
- for (int i = 0; i < parentItem->childCount(); ++i) {
- SessionTreeItem* item = parentItem->child(i);
- if (item->text() == name) {
- parentItem->removeChild(item);
- }
+ for (int i = 0; i < root_->childCount(); ++i) {
+ SessionTreeItem* item = root_->child(i);
+ if (item->session()->shortDescription().contains(label, Qt::CaseInsensitive)) {
+ result.append(const_cast<Session*>(item->session()));
}
}
+ return result;
}
void SessionTreeModel::updateView() {
emit layoutChanged();
}
+
diff --git a/src/sessiontreemodel.h b/src/sessiontreemodel.h
index b8fd7ab..9079c59 100644
--- a/src/sessiontreemodel.h
+++ b/src/sessiontreemodel.h
@@ -27,9 +27,10 @@ class SessionTreeModel : public QAbstractItemModel {
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
- void addItems(const QList<Session*>& sessions, const QString& section);
- void addLabelItem(const QString& label, const QString& section);
- void removeItem(const QString& name, const QString& section);
+ void addItems(const QList<Session*>& sessions);
+ void addLabelItem(const QString& label);
+ void removeItem(const QString& name);
+ QList<Session*> lookForItem(const QString& label);
void updateView();
diff --git a/src/ui/dialog.ui b/src/ui/dialog.ui
index 6f8ce05..bd59605 100644
--- a/src/ui/dialog.ui
+++ b/src/ui/dialog.ui
@@ -102,55 +102,139 @@ margin-bottom:0px;}</string>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
+ <property name="leftMargin">
+ <number>3</number>
+ </property>
+ <property name="rightMargin">
+ <number>3</number>
+ </property>
<item>
- <widget class="QTreeView" name="treeView">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">#treeView {border-top:1px solid #999;
-border-bottom:1px solid #999;}
-</string>
- </property>
- <property name="frameShape">
- <enum>QFrame::HLine</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="lineWidth">
+ <layout class="QVBoxLayout" name="verticalLayout_11">
+ <property name="spacing">
<number>0</number>
</property>
- <property name="iconSize">
- <size>
- <width>32</width>
- <height>32</height>
- </size>
- </property>
- <property name="indentation">
- <number>12</number>
+ <property name="topMargin">
+ <number>3</number>
</property>
- <property name="headerHidden">
- <bool>true</bool>
- </property>
- <attribute name="headerMinimumSectionSize">
- <number>23</number>
- </attribute>
- </widget>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QPushButton" name="tabButtonLocal">
+ <property name="text">
+ <string>Local</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="tabButtonMyClasses">
+ <property name="text">
+ <string>My Classes</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="tabButtonAllClasses">
+ <property name="text">
+ <string>All Classes</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QTreeView" name="treeView">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">#treeView {
+border:1px solid #999;
+}
+</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="indentation">
+ <number>12</number>
+ </property>
+ <property name="headerHidden">
+ <bool>true</bool>
+ </property>
+ <attribute name="headerMinimumSectionSize">
+ <number>23</number>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <property name="leftMargin">
+ <number>5</number>
+ </property>
+ <property name="topMargin">
+ <number>4</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Filter:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="filterEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
@@ -174,17 +258,6 @@ border-bottom:1px solid #999;}
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QTextBrowser" name="textBrowser">
- <property name="html">
- <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Click on an item on the left side for more infos.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- </widget>
- </item>
<item row="0" column="0">
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
@@ -281,6 +354,17 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
+ <item row="3" column="0">
+ <widget class="QTextBrowser" name="textBrowser">
+ <property name="html">
+ <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;Click on an item on the left side for more infos.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -392,6 +476,13 @@ p, li { white-space: pre-wrap; }
<number>9</number>
</property>
<item>
+ <widget class="QPushButton" name="pushButton_2">
+ <property name="text">
+ <string>Report Bug</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -405,6 +496,19 @@ p, li { white-space: pre-wrap; }
</spacer>
</item>
<item>
+ <widget class="QPushButton" name="pushButton">
+ <property name="text">
+ <string>Help</string>
+ </property>
+ <property name="checkable">
+ <bool>false</bool>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QPushButton" name="pushButtonAbort">
<property name="text">
<string>Abort</string>
diff --git a/src/vsession.cpp b/src/vsession.cpp
index ebe369a..f8512fc 100644
--- a/src/vsession.cpp
+++ b/src/vsession.cpp
@@ -262,6 +262,10 @@ void VSession::mergePoolXml() {
}
bool VSession::run() const {
+ if (debugMode) {
+ qDebug() << "Sarting session " << this->getAttribute("short_description", "param") << " ...";
+ }
+
QString command = getAttribute("command");
if (!command.isEmpty()) {
return QProcess::startDetached(command);