[prev in list] [next in list] [prev in thread] [next in thread] 

List:       prelude-cvslog
Subject:    [prelude-cvslog] r10583 - in lmledit/trunk: . ui
From:       noreply () prelude-ids ! org
Date:       2008-05-08 18:40:03
Message-ID: 20080508184003.A49008A006D () inferno ! prelude-ids ! com
[Download RAW message or body]

Author: pollux
Date: 2008-05-08 20:40:03 +0200 (Thu, 08 May 2008)
New Revision: 10583

Added:
   lmledit/trunk/ui/rule-editor.ui
Modified:
   lmledit/trunk/rule-editor.cpp
   lmledit/trunk/rule-editor.h
Log:
Convert rule edition window to ui file


Modified: lmledit/trunk/rule-editor.cpp
===================================================================
--- lmledit/trunk/rule-editor.cpp	2008-05-08 18:38:50 UTC (rev 10582)
+++ lmledit/trunk/rule-editor.cpp	2008-05-08 18:40:03 UTC (rev 10583)
@@ -1,7 +1,3 @@
-#include <iostream>
-
-using std::cout;
-
 #include "rule-editor.h"
 
 #include "highlighter.h"
@@ -9,171 +5,117 @@
 
 #include "rule-editor.moc"
 
-#include <QtGui>
+//#include <QtGui>
 
-RuleEditor::RuleEditor()
-{
-	QDialogButtonBox * buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | \
                QDialogButtonBox::Cancel);
-	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
-	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+#include <ui_rule-editor.h>
 
-	QShortcut *shortcut = new QShortcut(QKeySequence(tr("Esc", "Close")), this);
-	connect(shortcut, SIGNAL(activated()), this, SLOT(reject()));
+#include <QFileInfo>
 
-	createActions();
-	createToolBars();
-	createEditors();
 
-        createPropertiesEditor();
+RuleEditor::RuleEditor(QWidget *parent)
+	: QDialog(parent)
+{
+	ui = new Ui::RuleEditor();
+	ui->setupUi(this);
 
-	layout = new QVBoxLayout;
-	layout->addWidget(editor);
-	layout->addWidget(regexEditor);
+	highlighter = new RuleSetHighlighter(ui->editor->document(),ui->regexEditor);
 
-	layout->addWidget(tabWidget);
+	connect(ui->regexEditor, SIGNAL(textChanged(const QString &)), highlighter, \
SLOT(rehighlight()));  
-	layout->addWidget(buttonBox);
+        createPropertiesEditor();
+	createValidators();
 
-	QWidget * widget = new QWidget;
-	widget->setLayout(layout);
-
-	setCentralWidget(widget);
-
-	setWindowTitle(tr("Rule editor"));
-
-	this->resize(600,500);
+	connectSlots();
 }
 
-void RuleEditor::createActions()
+void RuleEditor::connectSlots()
 {
-	openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this);
-	openAct->setShortcut(tr("Ctrl+O"));
-	openAct->setStatusTip(tr("Open an existing file"));
-	connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
-
-	openRegexAct = new QAction(QIcon(":/images/open.png"), tr("Open &Regex..."), this);
-	openRegexAct->setShortcut(tr("Ctrl+R"));
-	openRegexAct->setStatusTip(tr("Open a file containing a regular expression"));
-	connect(openRegexAct, SIGNAL(triggered()), this, SLOT(openRegex()));
-
-	saveRegexAct = new QAction(QIcon(":/images/save.png"), tr("&Save Regex..."), this);
-	saveRegexAct->setShortcut(tr("Ctrl+S"));
-	saveRegexAct->setStatusTip(tr("Save regular expression"));
-	connect(saveRegexAct, SIGNAL(triggered()), this, SLOT(saveRegex()));
-
+	connect(ui->pb_new_prop, SIGNAL(pressed()), this, SLOT(addProperty()));
+	connect(ui->pb_del_prop, SIGNAL(pressed()), this, SLOT(deleteProperty()));
 }
 
-void RuleEditor::createToolBars()
+void RuleEditor::createPropertiesEditor()
 {
-	fileToolBar = addToolBar(tr("File"));
-
-	fileToolBar->addAction(openAct);
-	fileToolBar->addAction(openRegexAct);
-	fileToolBar->addAction(saveRegexAct);
-
-	regexToolBar = addToolBar(tr("Regex"));
-	regexToolBar->addAction(QIcon(":/images/alpha.png"),tr("Alpha"),this,SLOT(addItemAlpha()));
                
-	regexToolBar->addAction(QIcon(":/images/digit.png"),tr("Decimal \
                Digit"),this,SLOT(addItemDigit()));
-}
-
-void RuleEditor::createEditors()
-{
-	regexEditor = new QLineEdit;
-	editor = new QTextEdit;
-
-	highlighter = new RuleSetHighlighter(editor->document(),regexEditor);
-
-	connect(regexEditor, SIGNAL(textChanged(const QString &)), highlighter, \
                SLOT(rehighlight()));
-
-	//editor->append("<a href=\"http://www.wzdftpd.net\">wzdftpd</a>");
-	//qDebug("%s", (const char*)editor->toHtml().toAscii());
-
-	optionsTable = new QTableWidget();
-	optionsTable->setColumnCount(2);
-	optionsTable->setRowCount(1);
+	ui->optionsTable->setColumnCount(2);
+	ui->optionsTable->setRowCount(1);
 	QStringList labels;
 	labels << tr("IDMEF Path") << tr("value");
-	optionsTable->setHorizontalHeaderLabels( labels );
-	optionsTable->setColumnWidth(0, optionsTable->width() * 45 / 100);
-	optionsTable->setColumnWidth(1, optionsTable->width() * 45 / 100);
-
+	ui->optionsTable->setHorizontalHeaderLabels( labels );
+	ui->optionsTable->setColumnWidth(0, ui->optionsTable->width() * 45 / 100);
+	ui->optionsTable->setColumnWidth(1, ui->optionsTable->width() * 45 / 100);
 }
 
-void RuleEditor::createPropertiesEditor()
+void RuleEditor::createValidators()
 {
-        tabWidget = new QTabWidget();
-
-        // first tab : IDMEF properties
-        gridProperties = new QGroupBox(tr("Properties"));
-        QGridLayout *layout = new QGridLayout;
-
-	layout->addWidget(optionsTable,0,0,1,2);
-
-        QPushButton * pb = new QPushButton(tr("New property"));
-        connect(pb, SIGNAL(pressed()), this, SLOT(addProperty()));
-        layout->addWidget(pb,1,0);
-        pb = new QPushButton(tr("Delete property"));
-        connect(pb, SIGNAL(pressed()), this, SLOT(deleteProperty()));
-        layout->addWidget(pb,1,1);
-
-        gridProperties->setLayout(layout);
-
-        tabWidget->addTab(gridProperties,"IDMEF");
-
-        // second tab : rules options
-        QWidget *w = new QWidget;
-        gridOptions = new QGroupBox(w);
-        layout = new QGridLayout;
-
-        bgroup = new QButtonGroup;
-        bgroup->setExclusive(false);
-
         QValidator *validator = new QIntValidator(0, INT_MAX, this);
 
-        add_option_button(layout, "id", B_ID, 0, 0);
-        le_id = new QLineEdit;
-        layout->addWidget(le_id,0,1);
-        le_id->setValidator(validator);
+        ui->le_id->setValidator(validator);
+        ui->le_revision->setValidator(validator);
+        ui->le_goto->setValidator(validator);
+        ui->le_optgoto->setValidator(validator);
+}
 
-        add_option_button(layout, "revision", B_REVISION, 1, 0);
-        le_revision = new QLineEdit;
-        layout->addWidget(le_revision,1,1);
-        le_revision->setValidator(validator);
+void RuleEditor::clear()
+{
+	ui->editor->clear();
+	ui->regexEditor->clear();
+	setCurrentRegexFile("");
 
-        add_option_button(layout, "last", B_LAST, 2, 0);
-        add_option_button(layout, "silent", B_SILENT, 3, 0);
-        add_option_button(layout, "chained", B_CHAINED, 4, 0);
+	clearOptions();
 
-        add_option_button(layout, "goto", B_GOTO, 0, 2);
-        le_goto = new QLineEdit;
-        layout->addWidget(le_goto,0,3);
-        le_goto->setValidator(validator);
+        ui->optionsTable->clearContents();
+        ui->optionsTable->setRowCount(0);
+}
 
-        add_option_button(layout, "optgoto", B_OPTGOTO, 1, 2);
-        le_optgoto = new QLineEdit;
-        layout->addWidget(le_optgoto,1,3);
-        le_optgoto->setValidator(validator);
+void RuleEditor::clearOptions()
+{
+	ui->cb_id->setCheckState(Qt::Unchecked);
+	ui->le_id->setEnabled(false);
+	ui->le_id->clear();
+	ui->cb_revision->setCheckState(Qt::Unchecked);
+	ui->le_revision->setEnabled(false);
+	ui->le_revision->clear();
+	ui->cb_last->setCheckState(Qt::Unchecked);
+	ui->cb_silent->setCheckState(Qt::Unchecked);
+	ui->cb_chained->setCheckState(Qt::Unchecked);
+	ui->cb_goto->setCheckState(Qt::Unchecked);
+	ui->le_goto->setEnabled(false);
+	ui->le_goto->clear();
+	ui->cb_optgoto->setCheckState(Qt::Unchecked);
+	ui->le_optgoto->setEnabled(false);
+	ui->le_optgoto->clear();
+}
 
-        gridOptions->setLayout(layout);
+void RuleEditor::setCurrentRegexFile(const QString &fileName)
+{
+	curRegexFile = fileName;
+	//textEdit->document()->setModified(false);
+	setWindowModified(false);
 
-        tabWidget->addTab(w,tr("Options"));
+	QString shownName;
+	if (curRegexFile.isEmpty())
+		shownName = "untitled";
+	else
+		shownName = strippedName(curRegexFile);
+
+	setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("lmledit")));
 }
 
 void RuleEditor::setRule(const Rule *r)
 {
         Q_ASSERT(r != NULL);
 
-        //cout << r << "\n";
+        //std::cout << r << "\n";
 
-	regexEditor->setText(r->regex());
+	ui->regexEditor->setText(r->regex());
 
         const QStringList logSamples = r->logSamples();
         for (int i=0; i<logSamples.size(); i++) {
-                editor->append( logSamples.at(i) );
+                ui->editor->append( logSamples.at(i) );
         }
 
-        optionsTable->clearContents();
-        optionsTable->setRowCount(0);
+        ui->optionsTable->clearContents();
+        ui->optionsTable->setRowCount(0);
         QList<QString> options = r->options();
         for (int index=0; index<options.size(); index++) {
                 addOption(options.at(index), r->getOption(options.at(index)));
@@ -197,236 +139,88 @@
 
 void RuleEditor::setRegex(const QString &s)
 {
-	regexEditor->setText(s);
+	ui->regexEditor->setText(s);
 }
 
 const QString RuleEditor::regex() const
 {
-	return regexEditor->text();
+	return ui->regexEditor->text();
 }
 
 void RuleEditor::setRuleId(const QString id)
 {
-        le_id->setText(id);
-        ( (QCheckBox*) bgroup->button(B_ID) )->setCheckState(Qt::Checked);
+        ui->cb_id->setCheckState(Qt::Checked);
+        ui->le_id->setText(id);
+        ui->le_id->setEnabled(true);
 }
 
 void RuleEditor::setLast(bool is_last)
 {
-        ( (QCheckBox*) bgroup->button(B_LAST) )->setCheckState( \
(is_last)?Qt::Checked:Qt::Unchecked); +        ui->cb_last->setCheckState( \
(is_last)?Qt::Checked:Qt::Unchecked);  }
 
 void RuleEditor::setRevision(const QString t)
 {
-        le_revision->setText(t);
-        ( (QCheckBox*) bgroup->button(B_REVISION) )->setCheckState(Qt::Checked);
+        ui->cb_revision->setCheckState(Qt::Checked);
+        ui->le_revision->setEnabled(true);
+        ui->le_revision->setText(t);
 }
 
 void RuleEditor::setSilent(bool is_set)
 {
-        ( (QCheckBox*) bgroup->button(B_SILENT) )->setCheckState( \
(is_set)?Qt::Checked:Qt::Unchecked); +        ui->cb_silent->setCheckState( \
(is_set)?Qt::Checked:Qt::Unchecked);  }
 
 void RuleEditor::setChained(bool is_set)
 {
-        ( (QCheckBox*) bgroup->button(B_CHAINED) )->setCheckState( \
(is_set)?Qt::Checked:Qt::Unchecked); +        ui->cb_chained->setCheckState( \
(is_set)?Qt::Checked:Qt::Unchecked);  }
 
 void RuleEditor::setGoto(const QString t)
 {
-        le_goto->setText(t);
-        ( (QCheckBox*) bgroup->button(B_GOTO) )->setCheckState(Qt::Checked);
+        ui->cb_goto->setCheckState(Qt::Checked);
+        ui->le_goto->setEnabled(true);
+        ui->le_goto->setText(t);
 }
 
 void RuleEditor::setOptGoto(const QString t)
 {
-        le_optgoto->setText(t);
-        ( (QCheckBox*) bgroup->button(B_OPTGOTO) )->setCheckState(Qt::Checked);
+        ui->cb_optgoto->setCheckState(Qt::Checked);
+        ui->le_optgoto->setEnabled(true);
+        ui->le_optgoto->setText(t);
 }
 
 void RuleEditor::addProperty()
 {
-        int rows = optionsTable->rowCount();
-        optionsTable->setRowCount(rows+1);
+        int rows = ui->optionsTable->rowCount();
+        ui->optionsTable->setRowCount(rows+1);
 }
 
 void RuleEditor::deleteProperty()
 {
-        int row = optionsTable->currentRow();
+        int row = ui->optionsTable->currentRow();
 
         if (row >= 0) {
-                optionsTable->removeRow(row);
+                ui->optionsTable->removeRow(row);
         }
 }
 
 void RuleEditor::addOption(const QString &key, const QString &value)
 {
         QTableWidgetItem *newItem;
-        int rows = optionsTable->rowCount();
+        int rows = ui->optionsTable->rowCount();
 
-        optionsTable->setRowCount(rows+1);
+        ui->optionsTable->setRowCount(rows+1);
 
         newItem = new QTableWidgetItem(key);
-        optionsTable->setItem(rows-1,0,newItem);
+        ui->optionsTable->setItem(rows-1,0,newItem);
 
         newItem = new QTableWidgetItem(value);
-        optionsTable->setItem(rows-1,1,newItem);
+        ui->optionsTable->setItem(rows-1,1,newItem);
 }
 
-void RuleEditor::open()
-{
-//	if (maybeSave()) {
-		QString fileName = QFileDialog::getOpenFileName(this);
-		if (!fileName.isEmpty())
-			loadFile(fileName);
-//	}
-}
-
-void RuleEditor::openRegex()
-{
-//	if (maybeSave()) {
-		QString fileName = QFileDialog::getOpenFileName(this,tr("Open Regex \
                File"),"",tr("Regex files (*.pcre)"));
-		if (!fileName.isEmpty())
-			loadRegexFile(fileName);
-//	}
-}
-
-bool RuleEditor::saveRegex()
-{
-	if (curRegexFile.isEmpty()) {
-		return saveRegexAs();
-	} else {
-		return saveRegexFile(curRegexFile);
-	}
-}
-
-bool RuleEditor::saveRegexAs()
-{
-	QString fileName = QFileDialog::getSaveFileName(this,tr("Save Regex \
                File"),"",tr("Regex files (*.pcre)"));
-	if (fileName.isEmpty())
-		return false;
-
-	return saveRegexFile(fileName);
-}
-
-void RuleEditor::accept()
-{
-	emit accepted();
-	this->close();
-}
-
-void RuleEditor::reject()
-{
-	emit rejected();
-	this->close();
-}
-
-void RuleEditor::clear()
-{
-	editor->clear();
-	regexEditor->clear();
-	setCurrentRegexFile("");
-}
-
-void RuleEditor::addItemAlpha()
-{
-	regexEditor->insert("[[:alpha:]]");
-}
-
-void RuleEditor::addItemDigit()
-{
-	regexEditor->insert("\\d");
-}
-
-
-
-
-
-void RuleEditor::loadFile(const QString &fileName)
-{
-	QFile file(fileName);
-	if (!file.open(QFile::ReadOnly | QFile::Text)) {
-		QMessageBox::warning(this, tr("Application"),
-				tr("Cannot read file %1:\n%2.")
-				.arg(fileName)
-				.arg(file.errorString()));
-		return;
-	}
-
-	QTextStream in(&file);
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	editor->setPlainText(in.readAll());
-	QApplication::restoreOverrideCursor();
-
-	//setCurrentFile(fileName);
-	//statusBar()->showMessage(tr("File loaded"), 2000);
-}
-
-void RuleEditor::loadRegexFile(const QString &fileName)
-{
-	QFile file(fileName);
-	if (!file.open(QFile::ReadOnly | QFile::Text)) {
-		QMessageBox::warning(this, tr("Application"),
-				tr("Cannot read file %1:\n%2.")
-				.arg(fileName)
-				.arg(file.errorString()));
-		return;
-	}
-
-	QTextStream in(&file);
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	regexEditor->setText(in.readAll());
-	QApplication::restoreOverrideCursor();
-
-	setCurrentRegexFile(fileName);
-	//statusBar()->showMessage(tr("Regex loaded"), 2000);
-}
-
-bool RuleEditor::saveRegexFile(const QString &fileName)
-{
-	QFile file(fileName);
-	if (!file.open(QFile::WriteOnly | QFile::Text)) {
-		QMessageBox::warning(this, tr("Application"),
-				tr("Cannot write file %1:\n%2.")
-				.arg(fileName)
-				.arg(file.errorString()));
-		return false;
-	}
-
-	QTextStream out(&file);
-	QApplication::setOverrideCursor(Qt::WaitCursor);
-	out << regexEditor->text();
-	QApplication::restoreOverrideCursor();
-
-	setCurrentRegexFile(fileName);
-	//statusBar()->showMessage(tr("File saved"), 2000);
-	return true;
-}
-
-void RuleEditor::setCurrentRegexFile(const QString &fileName)
-{
-	curRegexFile = fileName;
-	//textEdit->document()->setModified(false);
-	setWindowModified(false);
-
-	QString shownName;
-	if (curRegexFile.isEmpty())
-		shownName = "untitled";
-	else
-		shownName = strippedName(curRegexFile);
-
-	setWindowTitle(tr("%1[*] - %2").arg(shownName).arg(tr("lmledit")));
-}
-
 QString RuleEditor::strippedName(const QString &fullFileName)
 {
 	return QFileInfo(fullFileName).fileName();
 }
 
-void RuleEditor::add_option_button(QGridLayout *l, const char *t, int opt, int row, \
                int column)
-{
-        QCheckBox *cb = new QCheckBox(t);
-        bgroup->addButton(cb,opt);
-        l->addWidget(cb,row,column);
-}
-

Modified: lmledit/trunk/rule-editor.h
===================================================================
--- lmledit/trunk/rule-editor.h	2008-05-08 18:38:50 UTC (rev 10582)
+++ lmledit/trunk/rule-editor.h	2008-05-08 18:40:03 UTC (rev 10583)
@@ -1,46 +1,29 @@
 #ifndef __RULE_EDITOR__
 #define __RULE_EDITOR__
 
-#include <QMainWindow>
-
 class Rule;
 class RuleSetHighlighter;
 
-class QAction;
-class QButtonGroup;
-class QGridLayout;
-class QGroupBox;
-class QLineEdit;
-class QTableWidget;
-class QTabWidget;
-class QTextEdit;
-class QToolBar;
-class QVBoxLayout;
+#include <QDialog>
 
-enum b_option_id {
-        B_CHAINED=1,
-        B_LAST,
-        B_SILENT,
-        B_GOTO,
-        B_OPTGOTO,
-        B_ID,
-        B_REVISION,
+namespace Ui {
+	class RuleEditor;
 };
 
-class RuleEditor: public QMainWindow {
+class RuleEditor : public QDialog {
 	Q_OBJECT
 
 public:
-	RuleEditor();
+	RuleEditor(QWidget *parent = 0);
 
         void setRule(const Rule *r);
 
-	void setRegex(const QString &s);
-	const QString regex() const;
-
 	void setId(int id) { _id = id; }
 	int id() const { return _id; }
 
+	void setRegex(const QString &s);
+	const QString regex() const;
+
         void addOption(const QString &key, const QString &value);
 
         void setRuleId(const QString id);
@@ -52,67 +35,28 @@
         void setOptGoto(const QString t);
 
 public slots:
-	void accept();
-	void reject();
-
 	void clear();
 
-signals:
-	void accepted();
-	void rejected();
-
 private slots:
-	void open();
-	void openRegex();
+	void addProperty();
+	void deleteProperty();
 
-	bool saveRegex();
-	bool saveRegexAs();
-
-        void addProperty();
-        void deleteProperty();
-
-	void addItemAlpha();
-	void addItemDigit();
-
 private:
-	void createActions();
-	void createToolBars();
-	void createEditors();
         void createPropertiesEditor();
+        void createValidators();
+	void connectSlots();
 
-	void loadFile(const QString &fileName);
-	void loadRegexFile(const QString &fileName);
-	bool saveRegexFile(const QString &fileName);
+	void clearOptions();
 
 	void setCurrentRegexFile(const QString &fileName);
 	QString strippedName(const QString &fullFileName);
 
-        void add_option_button(QGridLayout *l, const char *t, int opt, int row, int \
                column);
-
-	QVBoxLayout *layout;
-
-	QLineEdit *regexEditor;
-	QTextEdit *editor;
-	QTabWidget *tabWidget;
-	QTableWidget *optionsTable;
-        QGroupBox *gridProperties;
-        QGroupBox *gridOptions;
-        QButtonGroup *bgroup;
-
 	RuleSetHighlighter * highlighter;
-
 	QString curRegexFile;
 
-        QLineEdit *le_id, *le_revision, *le_goto, *le_optgoto;
-
-	QToolBar * fileToolBar;
-	QToolBar * regexToolBar;
-
-	QAction * openAct;
-	QAction * openRegexAct;
-	QAction * saveRegexAct;
-
 	int _id;
+
+	Ui::RuleEditor *ui;
 };
 
 #endif /* __RULE_EDITOR__ */

Added: lmledit/trunk/ui/rule-editor.ui
===================================================================
--- lmledit/trunk/ui/rule-editor.ui	                        (rev 0)
+++ lmledit/trunk/ui/rule-editor.ui	2008-05-08 18:40:03 UTC (rev 10583)
@@ -0,0 +1,294 @@
+<ui version="4.0" >
+ <class>RuleEditor</class>
+ <widget class="QDialog" name="RuleEditor" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>582</width>
+    <height>526</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Rule Editor</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QTextEdit" name="editor" />
+   </item>
+   <item>
+    <widget class="QLineEdit" name="regexEditor" />
+   </item>
+   <item>
+    <widget class="QTabWidget" name="tabWidget" >
+     <property name="currentIndex" >
+      <number>0</number>
+     </property>
+     <widget class="QWidget" name="tab" >
+      <attribute name="title" >
+       <string>IDMEF</string>
+      </attribute>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>9</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <widget class="QTableWidget" name="optionsTable" />
+       </item>
+       <item>
+        <layout class="QHBoxLayout" >
+         <property name="margin" >
+          <number>0</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item>
+          <widget class="QPushButton" name="pb_new_prop" >
+           <property name="text" >
+            <string>New property</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pb_del_prop" >
+           <property name="text" >
+            <string>Delete property</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_2" >
+      <attribute name="title" >
+       <string>Options</string>
+      </attribute>
+      <layout class="QVBoxLayout" >
+       <property name="margin" >
+        <number>9</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <widget class="QGroupBox" name="optionsGroup" >
+         <property name="title" >
+          <string/>
+         </property>
+         <layout class="QGridLayout" >
+          <property name="margin" >
+           <number>9</number>
+          </property>
+          <property name="spacing" >
+           <number>6</number>
+          </property>
+          <item row="1" column="1" >
+           <widget class="QLineEdit" name="le_revision" >
+            <property name="enabled" >
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="0" >
+           <widget class="QCheckBox" name="cb_id" >
+            <property name="enabled" >
+             <bool>true</bool>
+            </property>
+            <property name="text" >
+             <string>id</string>
+            </property>
+           </widget>
+          </item>
+          <item row="4" column="0" >
+           <widget class="QCheckBox" name="cb_chained" >
+            <property name="text" >
+             <string>chained</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1" >
+           <widget class="QLineEdit" name="le_id" >
+            <property name="enabled" >
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="0" >
+           <widget class="QCheckBox" name="cb_silent" >
+            <property name="text" >
+             <string>silent</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0" >
+           <widget class="QCheckBox" name="cb_last" >
+            <property name="text" >
+             <string>last</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0" >
+           <widget class="QCheckBox" name="cb_revision" >
+            <property name="text" >
+             <string>revision</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="2" >
+           <widget class="QCheckBox" name="cb_goto" >
+            <property name="text" >
+             <string>goto</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="3" >
+           <widget class="QLineEdit" name="le_goto" >
+            <property name="enabled" >
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="2" >
+           <widget class="QCheckBox" name="cb_optgoto" >
+            <property name="text" >
+             <string>optgoto</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="3" >
+           <widget class="QLineEdit" name="le_optgoto" >
+            <property name="enabled" >
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
 +     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>RuleEditor</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>257</x>
+     <y>518</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>RuleEditor</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>325</x>
+     <y>518</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_id</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>le_id</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>49</x>
+     <y>276</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>172</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_revision</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>le_revision</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>69</x>
+     <y>308</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>141</x>
+     <y>304</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_goto</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>le_goto</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>319</x>
+     <y>270</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>367</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cb_optgoto</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>le_optgoto</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>309</x>
+     <y>314</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>359</x>
+     <y>314</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic