@@ -10,9 +10,7 @@
#include <QSettings>
#include "../expr.h"
#include "../lkc.h"
-#ifdef INCLUDEMOC
-#include "infoViewWidget.moc"
-#endif
+
InfoViewWidget::InfoViewWidget(QWidget* parent)
: Parent(parent), sym(0), _menu(0)
{
@@ -20,9 +20,7 @@
#include "../images.c"
#include "../expr.h"
#include "../lkc.h"
-#ifdef INCLUDEMOC
-#include "mainwindow.moc"
-#endif
+
bool qconf_MainWindow::check_conf_changed()
{
bool changed = conf_get_changed();
@@ -291,12 +289,13 @@ void qconf_MainWindow::on_actionLoad_triggered()
void qconf_MainWindow::on_actionBack_triggered()
{
- QModelIndex parent = ui->treeAll->rootIndex().parent();
- if (view_mode==SINGLE_VIEW) {
- ui->treeAll->setRootIndex(parent);
- ui->actionBack->setEnabled(parent.isValid());
- updateCurrentPositionLabel();
- }
+ // if (view_mode==SINGLE_VIEW)
+ QModelIndex current = ui->treeAll->rootIndex();
+ QModelIndex parent = current.parent();
+ ui->treeAll->setRootIndex(parent);
+ ui->actionBack->setEnabled(parent.isValid());
+ ui->treeAll->scrollTo(current);
+ updateCurrentPositionLabel();
}
void qconf_MainWindow::on_actionSingleView_triggered()
@@ -376,3 +375,8 @@ void qconf_MainWindow::updateCurrentPositionLabel()
}
ui->labelPosition->setText(t);
}
+
+void qconf_MainWindow::on_actionHide_disabled_subtrees_triggered()
+{
+ mBaseModel->setHideChildren(ui->actionHide_disabled_subtrees->isChecked());
+}
@@ -45,6 +45,8 @@ private Q_SLOTS:
void on_treeAll_activated(const QModelIndex &index);
void on_listSearch_clicked(const QModelIndex &index);
+ void on_actionHide_disabled_subtrees_triggered();
+
private:
Ui::qconf_MainWindow *ui;
ConfigModel* mBaseModel;
@@ -20,6 +20,9 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
+ <property name="childrenCollapsible">
+ <bool>false</bool>
+ </property>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
@@ -149,6 +152,8 @@
<property name="title">
<string>Option</string>
</property>
+ <addaction name="actionHide_disabled_subtrees"/>
+ <addaction name="separator"/>
<addaction name="actionShow_Name"/>
<addaction name="actionShow_Range"/>
<addaction name="actionShow_Data_Value"/>
@@ -380,6 +385,17 @@
<string>FullView</string>
</property>
</action>
+ <action name="actionHide_disabled_subtrees">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Hide disabled subtrees</string>
+ </property>
+ </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
@@ -4,9 +4,7 @@
*/
#include "searchfiltermodelproxy.h"
#include "configModel.h"
-#ifdef INCLUDEMOC
-#include "searchfiltermodelproxy.moc"
-#endif
+
SearchFilterModelProxy::SearchFilterModelProxy(QObject *parent) :
QSortFilterProxyModel(parent)
{
@@ -2,9 +2,7 @@
#include <QPalette>
#include "../expr.h"
#include "../lkc.h"
-#ifdef INCLUDEMOC
-#include "searchmodel.moc"
-#endif
+
SearchModel::item::item(struct menu* menu) {
this->menu = menu;