new ui component, mono fonts

This commit is contained in:
End 2020-09-04 02:26:25 +02:00
parent e5c2a5e84a
commit 289ac1d5ca
6 changed files with 152 additions and 16 deletions

View file

@ -37,13 +37,16 @@ add_executable(littlesnitch
session.cpp
httpflow.cpp
historymodel.cpp
editandresend.cpp
mainwindow.h
httpflow.h
networkthread.h
session.h
includes.h
historymodel.h
editandresend.h
mainwindow.ui
editandresend.ui
)
target_link_libraries(littlesnitch PRIVATE Qt5::Widgets cppzmq sqlite3)

14
editandresend.cpp Normal file
View file

@ -0,0 +1,14 @@
#include "editandresend.h"
#include "ui_editandresend.h"
EditAndResend::EditAndResend(QWidget *parent) :
QDialog(parent),
ui(new Ui::EditAndResend)
{
ui->setupUi(this);
}
EditAndResend::~EditAndResend()
{
delete ui;
}

22
editandresend.h Normal file
View file

@ -0,0 +1,22 @@
#ifndef EDITANDRESEND_H
#define EDITANDRESEND_H
#include <QDialog>
namespace Ui {
class EditAndResend;
}
class EditAndResend : public QDialog
{
Q_OBJECT
public:
explicit EditAndResend(QWidget *parent = nullptr);
~EditAndResend();
private:
Ui::EditAndResend *ui;
};
#endif // EDITANDRESEND_H

19
editandresend.ui Normal file
View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>EditAndResend</class>
<widget class="QDialog" name="EditAndResend">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>459</width>
<height>354</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -3,6 +3,7 @@
#include <includes.h>
#include <QAbstractTableModel>
#include <QSortFilterProxyModel>
#include <mutex>
struct HistoryItem {
int id = -1;

View file

@ -92,6 +92,11 @@
<height>50</height>
</size>
</property>
<property name="font">
<font>
<family>DejaVu Sans Mono</family>
</font>
</property>
</widget>
</item>
</layout>
@ -137,15 +142,50 @@
<height>100</height>
</size>
</property>
<property name="font">
<font>
<family>DejaVu Sans Mono</family>
</font>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QPlainTextEdit" name="plainTextEdit_2">
<property name="font">
<font>
<family>DejaVu Sans Mono</family>
</font>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QPlainTextEdit" name="plainTextEdit_2"/>
</widget>
<widget class="QSplitter" name="splitter_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QPlainTextEdit" name="plainTextEdit_3"/>
<widget class="QPlainTextEdit" name="plainTextEdit_4"/>
<widget class="QPlainTextEdit" name="plainTextEdit_3">
<property name="font">
<font>
<family>DejaVu Sans Mono</family>
</font>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
<widget class="QPlainTextEdit" name="plainTextEdit_4">
<property name="font">
<font>
<family>DejaVu Sans Mono</family>
</font>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget>
</widget>
</item>
@ -171,7 +211,7 @@
</property>
<widget class="QWidget" name="tabWidgetPage1">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -180,7 +220,19 @@
<string/>
</attribute>
<layout class="QFormLayout" name="formLayout">
<item row="1" column="0">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="rowWrapPolicy">
<enum>QFormLayout::WrapLongRows</enum>
</property>
<property name="formAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<item row="2" column="0">
<widget class="QComboBox" name="searchBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
@ -188,6 +240,11 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
</font>
</property>
<item>
<property name="text">
<string>all</string>
@ -220,29 +277,49 @@
</item>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="searchEdit"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="QTableView" name="historyHTTPTable">
<item row="2" column="1">
<widget class="QLineEdit" name="searchEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>DejaVu Sans</family>
</font>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QTableView" name="historyHTTPTable">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>0</height>
<width>778</width>
<height>134</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>1</width>
<height>0</height>
<height>1</height>
</size>
</property>
<property name="font">
<font>
<family>DejaVu Sans Mono</family>
</font>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
@ -259,7 +336,7 @@
<bool>true</bool>
</property>
<attribute name="verticalHeaderDefaultSectionSize">
<number>19</number>
<number>21</number>
</attribute>
</widget>
</item>
@ -276,7 +353,7 @@
<x>0</x>
<y>0</y>
<width>818</width>
<height>20</height>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">