Commit 5f7eaaf3 authored by Laurent Montel's avatar Laurent Montel 😁

Implement test apps

parent c8c93db9
set(sieveeditor_regexpeditor_SRCS
main.cpp
regexpeditorwidget.cpp
../regexpeditorlineedit.cpp
)
add_executable(sieveeditorregexpeditor_gui ${sieveeditor_regexpeditor_SRCS})
......
......@@ -18,11 +18,19 @@
*/
#include "regexpeditorwidget.h"
#include <QHBoxLayout>
#include "../regexpeditorlineedit.h"
#include <QVBoxLayout>
#include <QVariant>
#include <QCheckBox>
RegExpEditorWidget::RegExpEditorWidget(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *layout = new QVBoxLayout(this);
QCheckBox *switchToRegexp = new QCheckBox(QStringLiteral("Switch to regexp line edit"), this);
layout->addWidget(switchToRegexp);
mLineEdit = new RegexpEditorLineEdit(this);
connect(switchToRegexp, &QCheckBox::toggled, mLineEdit, &RegexpEditorLineEdit::switchToRegexpEditorLineEdit);
layout->addWidget(mLineEdit);
}
......@@ -21,14 +21,15 @@
#define REGEXPEDITORWIDGET_H
#include <QWidget>
class RegexpEditorLineEdit;
class RegExpEditorWidget : public QWidget
{
Q_OBJECT
public:
explicit RegExpEditorWidget(QWidget *parent = nullptr);
~RegExpEditorWidget() = default;
private:
RegexpEditorLineEdit *mLineEdit;
};
#endif // REGEXPEDITORWIDGET_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment