update ui to match new extension window design

This commit is contained in:
Akash Mozumdar 2018-11-01 17:02:52 -04:00
parent 6ec8e7c19e
commit 4b82d545bf
4 changed files with 152 additions and 298 deletions

View File

@ -13,6 +13,24 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Extensions</string> <string>Extensions</string>
</property> </property>
<property name="styleSheet">
<string notr="true">QObject
{
font: 10pt &quot;MS Shell Dlg 2&quot;;
}
#textOutput
{
font: 13pt &quot;MS Shell Dlg 2&quot;;;
}
QPushButton, QComboBox
{
padding-top: 3px;
padding-bottom: 3px;
padding-right: 5px;
padding-left: 5px;
text-align: left;
}</string>
</property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
@ -26,7 +44,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout">
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
@ -49,7 +67,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_2"> <spacer>
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>

View File

@ -14,7 +14,6 @@ MainWindow::MainWindow(QWidget *parent) :
processCombo = findChild<QComboBox*>("processCombo"); processCombo = findChild<QComboBox*>("processCombo");
ttCombo = findChild<QComboBox*>("ttCombo"); ttCombo = findChild<QComboBox*>("ttCombo");
extenCombo = findChild<QComboBox*>("extenCombo");
textOutput = findChild<QPlainTextEdit*>("textOutput"); textOutput = findChild<QPlainTextEdit*>("textOutput");
if (settings.contains("Window")) this->setGeometry(settings.value("Window").toRect()); if (settings.contains("Window")) this->setGeometry(settings.value("Window").toRect());
@ -225,14 +224,14 @@ void MainWindow::on_saveButton_clicked()
file.write((hookList + "\r\n").toUtf8()); file.write((hookList + "\r\n").toUtf8());
} }
void MainWindow::on_extenButton_clicked()
{
extenWindow->activateWindow();
extenWindow->showNormal();
}
void MainWindow::on_ttCombo_activated(int index) void MainWindow::on_ttCombo_activated(int index)
{ {
textOutput->setPlainText(QString::fromStdWString(Host::GetThread(ParseTextThreadString(ttCombo->itemText(index)))->GetStorage())); textOutput->setPlainText(QString::fromStdWString(Host::GetThread(ParseTextThreadString(ttCombo->itemText(index)))->GetStorage()));
textOutput->moveCursor(QTextCursor::End); textOutput->moveCursor(QTextCursor::End);
} }
void MainWindow::on_addExtenButton_clicked()
{
extenWindow->activateWindow();
extenWindow->showNormal();
}

View File

@ -37,11 +37,11 @@ private slots:
void ThreadOutput(QString threadString, QString output); // this function doesn't take TextThread* because it might be destroyed on pipe thread void ThreadOutput(QString threadString, QString output); // this function doesn't take TextThread* because it might be destroyed on pipe thread
void on_attachButton_clicked(); void on_attachButton_clicked();
void on_detachButton_clicked(); void on_detachButton_clicked();
void on_ttCombo_activated(int index);
void on_unhookButton_clicked(); void on_unhookButton_clicked();
void on_hookButton_clicked(); void on_hookButton_clicked();
void on_saveButton_clicked(); void on_saveButton_clicked();
void on_addExtenButton_clicked(); void on_extenButton_clicked();
void on_ttCombo_activated(int index);
private: private:
bool ProcessThreadOutput(TextThread* thread, std::wstring& output); bool ProcessThreadOutput(TextThread* thread, std::wstring& output);
@ -55,7 +55,6 @@ private:
QSettings settings = QSettings("Textractor.ini", QSettings::IniFormat); QSettings settings = QSettings("Textractor.ini", QSettings::IniFormat);
QComboBox* processCombo; QComboBox* processCombo;
QComboBox* ttCombo; QComboBox* ttCombo;
QComboBox* extenCombo;
QPlainTextEdit* textOutput; QPlainTextEdit* textOutput;
QWidget* extenWindow; QWidget* extenWindow;
}; };

View File

@ -6,16 +6,10 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>949</width> <width>900</width>
<height>600</height> <height>600</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Textractor</string> <string>Textractor</string>
</property> </property>
@ -38,64 +32,13 @@ QPushButton, QComboBox
}</string> }</string>
</property> </property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="options">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item> <item>
<widget class="QFrame" name="processManager"> <widget class="QFrame" name="processManager">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="sizePolicy"> <layout class="QVBoxLayout">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -156,113 +99,25 @@ QPushButton, QComboBox
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item>
<widget class="QPushButton" name="extenButton">
<property name="text">
<string>Extensions</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer"> <spacer>
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QFrame" name="extenManager">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="extenCombo">
<property name="editable">
<bool>false</bool>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="addExtenButton">
<property name="text">
<string>Add extension</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="moveExtenButton">
<property name="text">
<string>Move extension</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="rmvExtenButton">
<property name="text">
<string>Remove extension</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QFrame" name="output"> <layout class="QVBoxLayout">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>6</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<item> <item>
<widget class="QComboBox" name="ttCombo"> <widget class="QComboBox" name="ttCombo">
<property name="editable"> <property name="editable">
@ -275,32 +130,15 @@ QPushButton, QComboBox
</item> </item>
<item> <item>
<widget class="QPlainTextEdit" name="textOutput"> <widget class="QPlainTextEdit" name="textOutput">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>5</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>949</width>
<height>22</height>
</rect>
</property>
</widget>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<resources/> <resources/>