parent
54323a1cb6
commit
2a0b44e768
2 changed files with 141 additions and 0 deletions
@ -0,0 +1,39 @@ |
||||
#ifndef __SCRIPTFILE__HXX |
||||
#define __SCRIPTFILE__HXX |
||||
|
||||
#include <ui_scriptfile.hxx> |
||||
#include <cassert> |
||||
|
||||
class ScriptFile: public QDockWidget, protected Ui::ScriptFile { |
||||
Q_OBJECT; |
||||
Q_SIGNALS: |
||||
void include(QString); |
||||
void close(ScriptFile*); |
||||
public: |
||||
ScriptFile(QWidget* p=0): QDockWidget(p) { |
||||
setupUi(this); |
||||
assert(connect(_editor, SIGNAL(include(QString)), SIGNAL(include(QString)))); |
||||
_searchBar->hide(); |
||||
_replaceBar->hide(); |
||||
_pageBar->hide(); |
||||
} |
||||
CodeEditor* editor() { |
||||
return _editor; |
||||
} |
||||
QString name() { |
||||
return _name; |
||||
} |
||||
void name(QString name) { |
||||
_name = name; |
||||
setWindowTitle(name+"[*]"); |
||||
setWindowModified(false); |
||||
} |
||||
protected: |
||||
void closeEvent (QCloseEvent *event) { |
||||
close(this); |
||||
} |
||||
private: |
||||
QString _name; |
||||
}; |
||||
|
||||
#endif |
@ -0,0 +1,102 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<ui version="4.0"> |
||||
<class>ScriptFile</class> |
||||
<widget class="QDockWidget" name="ScriptFile"> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>628</width> |
||||
<height>378</height> |
||||
</rect> |
||||
</property> |
||||
<property name="windowTitle"> |
||||
<string>DockW&idget</string> |
||||
</property> |
||||
<widget class="QWidget" name="dockWidgetContents"> |
||||
<layout class="QVBoxLayout" name="verticalLayout"> |
||||
<item> |
||||
<widget class="CodeEditor" name="_editor"/> |
||||
</item> |
||||
<item> |
||||
<widget class="QWidget" name="_searchBar" native="true"> |
||||
<layout class="QHBoxLayout" name="horizontalLayout"> |
||||
<item> |
||||
<widget class="QLineEdit" name="_from"/> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="_next"> |
||||
<property name="text"> |
||||
<string>next</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="_previous"> |
||||
<property name="text"> |
||||
<string>previous</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="_all"> |
||||
<property name="text"> |
||||
<string>all</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QWidget" name="_replaceBar" native="true"> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_2"> |
||||
<item> |
||||
<widget class="QLineEdit" name="_to"/> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="_replace"> |
||||
<property name="text"> |
||||
<string>replace</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QCheckBox" name="_regex"> |
||||
<property name="text"> |
||||
<string>RegularExpression</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
<item> |
||||
<widget class="QWidget" name="_pageBar" native="true"> |
||||
<layout class="QHBoxLayout" name="horizontalLayout_3"> |
||||
<item> |
||||
<widget class="QSpinBox" name="_page"/> |
||||
</item> |
||||
<item> |
||||
<widget class="QPushButton" name="_goPage"> |
||||
<property name="text"> |
||||
<string>page</string> |
||||
</property> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</item> |
||||
</layout> |
||||
</widget> |
||||
</widget> |
||||
<customwidgets> |
||||
<customwidget> |
||||
<class>CodeEditor</class> |
||||
<extends>QPlainTextEdit</extends> |
||||
<header>editor.hxx</header> |
||||
</customwidget> |
||||
</customwidgets> |
||||
<resources/> |
||||
<connections/> |
||||
</ui> |
Loading…
Reference in new issue