[Cmake-commits] [cmake-commits] clinton committed CMakeSetupDialog.cxx 1.54 1.55 CMakeSetupDialog.h 1.28 1.29 CMakeSetupDialog.ui 1.19 1.20
cmake-commits at cmake.org
cmake-commits at cmake.org
Sat Jul 5 13:25:06 EDT 2008
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv5710
Modified Files:
CMakeSetupDialog.cxx CMakeSetupDialog.h CMakeSetupDialog.ui
Log Message:
ENH: Replace Advanced checkbox and group option in menu with a combo box to
choose view type.
Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.54
retrieving revision 1.55
diff -C 2 -d -r1.54 -r1.55
*** CMakeSetupDialog.cxx 13 Jun 2008 15:19:53 -0000 1.54
--- CMakeSetupDialog.cxx 5 Jul 2008 17:25:04 -0000 1.55
***************
*** 79,85 ****
bool groupView = settings.value("GroupView", false).toBool();
! this->CacheValues->cacheModel()->setViewType(groupView ?
! QCMakeCacheModel::GroupView : QCMakeCacheModel::FlatView);
! this->CacheValues->setRootIsDecorated(groupView);
QMenu* FileMenu = this->menuBar()->addMenu(tr("&File"));
--- 79,87 ----
bool groupView = settings.value("GroupView", false).toBool();
! if(groupView)
! {
! this->setViewType(2);
! this->ViewType->setCurrentIndex(2);
! }
QMenu* FileMenu = this->menuBar()->addMenu(tr("&File"));
***************
*** 119,127 ****
OptionsMenu->addSeparator();
- QAction* groupAction = OptionsMenu->addAction(tr("&Group Entries"));
- groupAction->setCheckable(true);
- groupAction->setChecked(this->CacheValues->cacheModel()->viewType() == QCMakeCacheModel::GroupView);
- QObject::connect(groupAction, SIGNAL(toggled(bool)),
- this, SLOT(toggleGroupView(bool)));
QAction* expandAction = OptionsMenu->addAction(tr("&Expand Grouped Entries"));
QObject::connect(expandAction, SIGNAL(triggered(bool)),
--- 121,124 ----
***************
*** 215,220 ****
this, SLOT(message(QString)));
! QObject::connect(this->Advanced, SIGNAL(clicked(bool)),
! this->CacheValues, SLOT(setShowAdvanced(bool)));
QObject::connect(this->Search, SIGNAL(textChanged(QString)),
this->CacheValues, SLOT(setSearchFilter(QString)));
--- 212,217 ----
this, SLOT(message(QString)));
! QObject::connect(this->ViewType, SIGNAL(currentIndexChanged(int)),
! this, SLOT(setViewType(int)));
QObject::connect(this->Search, SIGNAL(textChanged(QString)),
this->CacheValues, SLOT(setSearchFilter(QString)));
***************
*** 932,943 ****
}
! void CMakeSetupDialog::toggleGroupView(bool f)
{
! this->CacheValues->cacheModel()->setViewType(f ? QCMakeCacheModel::GroupView : QCMakeCacheModel::FlatView);
! this->CacheValues->setRootIsDecorated(f);
QSettings settings;
settings.beginGroup("Settings/StartPath");
! settings.setValue("GroupView", this->CacheValues->cacheModel()->viewType() == QCMakeCacheModel::GroupView);
}
--- 929,957 ----
}
! void CMakeSetupDialog::setViewType(int v)
{
! if(v == 0) // simple view
! {
! this->CacheValues->cacheModel()->setViewType(QCMakeCacheModel::FlatView);
! this->CacheValues->setRootIsDecorated(false);
! this->CacheValues->setShowAdvanced(false);
! }
! else if(v == 1) // advanced view
! {
! this->CacheValues->cacheModel()->setViewType(QCMakeCacheModel::FlatView);
! this->CacheValues->setRootIsDecorated(false);
! this->CacheValues->setShowAdvanced(true);
! }
! else if(v == 2) // grouped view
! {
! this->CacheValues->cacheModel()->setViewType(QCMakeCacheModel::GroupView);
! this->CacheValues->setRootIsDecorated(true);
! this->CacheValues->setShowAdvanced(true);
! }
QSettings settings;
settings.beginGroup("Settings/StartPath");
! settings.setValue("GroupView", v == 2);
!
}
Index: CMakeSetupDialog.ui
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.ui,v
retrieving revision 1.19
retrieving revision 1.20
diff -C 2 -d -r1.19 -r1.20
*** CMakeSetupDialog.ui 10 Jun 2008 04:17:00 -0000 1.19
--- CMakeSetupDialog.ui 5 Jul 2008 17:25:04 -0000 1.20
***************
*** 128,135 ****
</item>
<item>
! <widget class="QCheckBox" name="Advanced" >
<property name="text" >
! <string>Show Ad&vanced Entries</string>
</property>
</widget>
</item>
--- 128,147 ----
</item>
<item>
! <widget class="QComboBox" name="ViewType" >
! <item>
<property name="text" >
! <string>Simple View</string>
! </property>
! </item>
! <item>
! <property name="text" >
! <string>Advanced View</string>
! </property>
! </item>
! <item>
! <property name="text" >
! <string>Grouped View</string>
</property>
+ </item>
</widget>
</item>
Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -C 2 -d -r1.28 -r1.29
*** CMakeSetupDialog.h 13 Jun 2008 15:19:53 -0000 1.28
--- CMakeSetupDialog.h 5 Jul 2008 17:25:04 -0000 1.29
***************
*** 76,80 ****
void startSearch();
void setDebugOutput(bool);
! void toggleGroupView(bool);
protected:
--- 76,80 ----
void startSearch();
void setDebugOutput(bool);
! void setViewType(int);
protected:
More information about the Cmake-commits
mailing list