summaryrefslogtreecommitdiffstats
path: root/part/kxesearchdialog.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-26 13:50:43 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-26 13:50:43 +0100
commitd62c8c002c51fb7c36487839eeeb4ac89f044dee (patch)
treebb4d1f5c631ab1f22a3018ba39e6a806035f80fd /part/kxesearchdialog.cpp
downloadkxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.tar.gz
kxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.zip
Initial import of kxmleditor 1.1.4
Diffstat (limited to 'part/kxesearchdialog.cpp')
-rw-r--r--part/kxesearchdialog.cpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/part/kxesearchdialog.cpp b/part/kxesearchdialog.cpp
new file mode 100644
index 0000000..5830e96
--- /dev/null
+++ b/part/kxesearchdialog.cpp
@@ -0,0 +1,56 @@
+/***************************************************************************
+ kxesearchdialog.cpp - description
+ -------------------
+ begin : Tue Jul 10 2001
+ copyright : (C) 2001, 2002, 2003 by The KXMLEditor Team
+ email : lvanek@users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "kxesearchdialog.h"
+
+#include <qpushbutton.h>
+
+KXESearchDialog::KXESearchDialog(QWidget *parent, const char *name, bool modal)
+ : KXESearchDialogBase(parent, name, modal)
+{
+ m_pPushButtonFind->setEnabled(false);
+ m_pEditSearchedString->setFocus();
+ m_pPushButtonFind->setDefault(true);
+}
+
+void KXESearchDialog::slotTextChanged(const QString& string)
+{
+ if ( string.isEmpty() )
+ m_pPushButtonFind->setEnabled(false);
+ else
+ m_pPushButtonFind->setEnabled(true);
+
+ toggleAcceptButton();
+}
+
+void KXESearchDialog::slotFindInChanged()
+{
+ toggleAcceptButton();
+}
+
+void KXESearchDialog::toggleAcceptButton()
+{
+ if ( (m_pCheckBoxElementNames->isChecked()) ||(m_pCheckBoxAttributeNames->isChecked()) || (m_pCheckBoxAttributeValues->isChecked()) || (m_pCheckBoxContents->isChecked()) )
+ {
+ if ( m_pEditSearchedString->text().isEmpty() )
+ m_pPushButtonFind->setEnabled(false);
+ else
+ m_pPushButtonFind->setEnabled(true);
+ }
+ else
+ m_pPushButtonFind->setEnabled(false);
+}