This is a small dialog to edit and check a regular expression. More...
#include <regexcheckdialog.h>
Public Member Functions | |
RegexCheckDialog (QWidget *parent) | |
QString | getRegex () |
void | setRegex (QString regex) |
Private Slots | |
void | slotButtonClicked (int button) |
Activated when a button is clicked. | |
void | checkRegex () |
Checkes the regex. | |
Private Member Functions | |
void | writeBlack (QString text) |
Writes a black colored text into the result field. | |
void | writeGreen (QString text) |
Writes a green colored text into the result field. | |
void | writeRed (QString text) |
Writes a red colored text into the result field. | |
Private Attributes | |
KLineEdit * | txtRegEx |
Edit line to enter the regular expression. | |
KLineEdit * | txtTestString |
Edit line to enter a test string. | |
QLabel * | txtResult |
In this line we show the result of the regex check. |
This is a small dialog to edit and check a regular expression.
Definition at line 41 of file regexcheckdialog.h.
RegexCheckDialog::RegexCheckDialog | ( | QWidget * | parent | ) |
void RegexCheckDialog::checkRegex | ( | ) | [private, slot] |
Checkes the regex.
This methode gets the regex and the test phrases and test whether the regex matches the phrase. Writes the result into txtResult.
Definition at line 73 of file regexcheckdialog.cpp.
QString RegexCheckDialog::getRegex | ( | ) |
Returns the entered regex
Definition at line 144 of file regexcheckdialog.cpp.
void RegexCheckDialog::setRegex | ( | QString | regex | ) |
Sets the regex into the edit line
regex | the regex |
Definition at line 149 of file regexcheckdialog.cpp.
void RegexCheckDialog::slotButtonClicked | ( | int | button | ) | [private, slot] |
Activated when a button is clicked.
Overrides KDialog::slotButtonClicked(int)
button | clicked button (see KDialog::ButtonCode) |
Definition at line 59 of file regexcheckdialog.cpp.
void RegexCheckDialog::writeBlack | ( | QString | text | ) | [private] |
Writes a black colored text into the result field.
text | text to write |
Definition at line 107 of file regexcheckdialog.cpp.
void RegexCheckDialog::writeGreen | ( | QString | text | ) | [private] |
Writes a green colored text into the result field.
text | text to write |
Definition at line 120 of file regexcheckdialog.cpp.
void RegexCheckDialog::writeRed | ( | QString | text | ) | [private] |
Writes a red colored text into the result field.
text | text to write |
Definition at line 132 of file regexcheckdialog.cpp.
KLineEdit* RegexCheckDialog::txtRegEx [private] |
Edit line to enter the regular expression.
Definition at line 71 of file regexcheckdialog.h.
QLabel* RegexCheckDialog::txtResult [private] |
In this line we show the result of the regex check.
Definition at line 81 of file regexcheckdialog.h.
KLineEdit* RegexCheckDialog::txtTestString [private] |
Edit line to enter a test string.
Definition at line 76 of file regexcheckdialog.h.