summaryrefslogtreecommitdiffstats
path: root/quanta/components/debugger/conditionalbreakpointdialog.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /quanta/components/debugger/conditionalbreakpointdialog.cpp
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/components/debugger/conditionalbreakpointdialog.cpp')
-rw-r--r--quanta/components/debugger/conditionalbreakpointdialog.cpp100
1 files changed, 100 insertions, 0 deletions
diff --git a/quanta/components/debugger/conditionalbreakpointdialog.cpp b/quanta/components/debugger/conditionalbreakpointdialog.cpp
new file mode 100644
index 00000000..943c33d4
--- /dev/null
+++ b/quanta/components/debugger/conditionalbreakpointdialog.cpp
@@ -0,0 +1,100 @@
+/***************************************************************************
+ conditionalbreakpointdialog.cpp
+ --------------------
+ begin : 2005-01-08
+ copyright : (C) 2004 Linus McCabe <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 "conditionalbreakpointdialog.h"
+#include <qlistview.h>
+#include <qlineedit.h>
+#include <qextfileinfo.h>
+#include <qcolor.h>
+#include <kcombobox.h>
+#include <kled.h>
+#include <kiconloader.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+
+#include "debuggerbreakpoint.h"
+
+ConditionalBreakpointDialog::ConditionalBreakpointDialog(const QString& expression, const QString& inFile, const QString& inClass, const QString& inFunction)
+ : ConditionalBreakpointDialogS(0, "ConditionalBreakpointDialog", false, 0)
+{
+ comboExpression->setCurrentText(expression);
+ lineFile->setText(inFile);
+ lineClass->setText(inClass);
+ lineFunction->setText(inFunction);
+
+ buttonClearFile->setPixmap(SmallIcon("clear_left"));
+ buttonClearClass->setPixmap(SmallIcon("clear_left"));
+ buttonClearFunction->setPixmap(SmallIcon("clear_left"));
+
+ connect(comboExpression, SIGNAL(textChanged(const QString&)), this, SLOT(slotExpressionChanged()));
+
+ connect(buttonClearFile, SIGNAL(pressed()), this, SLOT(slotClearFile()));
+ connect(buttonClearClass, SIGNAL(pressed()), this, SLOT(slotClearClass()));
+ connect(buttonClearFunction, SIGNAL(pressed()), this, SLOT(slotClearFunction()));
+
+ slotExpressionChanged();
+}
+
+ConditionalBreakpointDialog::~ConditionalBreakpointDialog()
+{
+}
+
+void ConditionalBreakpointDialog::slotExpressionChanged()
+{
+
+ if(comboExpression->currentText().find( QRegExp("[^=!]=[^=]"), 0 ) >= 0)
+ ledWarning->on();
+ else
+ ledWarning->off();
+
+}
+
+void ConditionalBreakpointDialog::slotClearFile()
+{
+ lineFile->setText("");
+}
+
+void ConditionalBreakpointDialog::slotClearClass()
+{
+ lineClass->setText("");
+}
+
+void ConditionalBreakpointDialog::slotClearFunction()
+{
+ lineFunction->setText("");
+}
+
+/*DebuggerBreakpoint::Types type()*/
+
+DebuggerBreakpoint *ConditionalBreakpointDialog::breakpoint()
+{
+ if(comboExpression->currentText().isEmpty())
+ return NULL;
+
+ DebuggerBreakpoint *bp = new DebuggerBreakpoint(
+ (radioOnChange->isChecked() ? DebuggerBreakpoint::ConditionalChange : DebuggerBreakpoint::ConditionalTrue),
+ comboExpression->currentText(),
+ lineFile->text(),
+ lineClass->text(),
+ lineFunction->text());
+
+ return bp;
+}
+
+
+#include "conditionalbreakpointdialog.moc"
+