diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-01-29 13:24:20 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2015-01-29 13:24:20 +0900 |
commit | 570104ceed8613903f249f2e5768c5cceb6f0012 (patch) | |
tree | 50f4806b7a615ec7f92cd27b7d5c5df56f569eaa /tdefilereplace/knewprojectdlg.cpp | |
parent | 08f2b5848ddd09e0da7e2d42a8743f0b40f1c717 (diff) | |
download | tdeutils-570104ceed8613903f249f2e5768c5cceb6f0012.tar.gz tdeutils-570104ceed8613903f249f2e5768c5cceb6f0012.zip |
Added 'max depth' search option to TDEFileReplace. This resolves bug 1238.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdefilereplace/knewprojectdlg.cpp')
-rw-r--r-- | tdefilereplace/knewprojectdlg.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tdefilereplace/knewprojectdlg.cpp b/tdefilereplace/knewprojectdlg.cpp index 06b703d..372ba18 100644 --- a/tdefilereplace/knewprojectdlg.cpp +++ b/tdefilereplace/knewprojectdlg.cpp @@ -58,6 +58,8 @@ KNewProjectDlg::KNewProjectDlg(RCOptions* info, TQWidget *parent, const char *na initGUI(); + connect(m_chbIncludeSubfolders, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableMaxDepthControls(bool))); + connect(m_chbLimitDepth, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableSpinboxMaxDepth(bool))); connect(m_pbLocation, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDir())); connect(m_pbCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReject())); connect(m_pbSearchNow, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearchNow())); @@ -176,6 +178,17 @@ void KNewProjectDlg::slotEnableSpinboxSizeMax(bool b) m_spbSizeMax->setEnabled(b); } +void KNewProjectDlg::slotEnableSpinboxMaxDepth(bool b) +{ + m_spbMaxDepth->setEnabled(b); +} + +void KNewProjectDlg::slotEnableMaxDepthControls(bool b) +{ + m_chbLimitDepth->setEnabled(b); + m_spbMaxDepth->setEnabled(b && m_chbLimitDepth->isChecked()); +} + void KNewProjectDlg::slotEnableCbValidDate(bool b) { Q_UNUSED(b); @@ -251,6 +264,10 @@ void KNewProjectDlg::loadOptions() m_chbCaseSensitive->setChecked(m_option->m_caseSensitive); m_chbEnableVariables->setChecked(m_option->m_variables); m_chbRegularExpressions->setChecked(m_option->m_regularExpressions); + m_chbLimitDepth->setEnabled(m_option->m_recursive); + m_chbLimitDepth->setChecked(m_option->m_limitDepth); + m_spbMaxDepth->setEnabled(m_option->m_recursive && m_option->m_limitDepth); + m_spbMaxDepth->setValue(m_option->m_maxDepth); } void KNewProjectDlg::loadFileSizeOptions() @@ -373,6 +390,9 @@ void KNewProjectDlg::saveOptions() m_option->m_caseSensitive = m_chbCaseSensitive->isChecked(); m_option->m_variables = m_chbEnableVariables->isChecked(); m_option->m_regularExpressions = m_chbRegularExpressions->isChecked(); + m_option->m_limitDepth = m_chbLimitDepth->isChecked(); + m_option->m_maxDepth = m_spbMaxDepth->value(); + } void KNewProjectDlg::saveFileSizeOptions() @@ -512,8 +532,12 @@ void KNewProjectDlg::whatsThis() TQWhatsThis::add(m_cbLocation, cbLocationWhatthis); TQWhatsThis::add(m_cbFilter, cbFilterWhatthis); + TQWhatsThis::add(m_chbSizeMin, edSizeMinWhatthis); TQWhatsThis::add(m_spbSizeMin, edSizeMinWhatthis); + TQWhatsThis::add(m_chbSizeMax, edSizeMaxWhatthis); TQWhatsThis::add(m_spbSizeMax, edSizeMaxWhatthis); + TQWhatsThis::add(m_chbLimitDepth, edMaxDepthWhatthis); + TQWhatsThis::add(m_spbMaxDepth, edMaxDepthWhatthis); TQWhatsThis::add(m_cbDateValid, cbDateValidWhatthis); TQWhatsThis::add(m_chbDateMin, chbDateMinWhatthis); |