From 289ac1d5ca56ec14503d735756b556283eef8f85 Mon Sep 17 00:00:00 2001 From: End Date: Fri, 4 Sep 2020 02:26:25 +0200 Subject: [PATCH] new ui component, mono fonts --- CMakeLists.txt | 3 ++ editandresend.cpp | 14 ++++++ editandresend.h | 22 ++++++++++ editandresend.ui | 19 ++++++++ historymodel.h | 1 + mainwindow.ui | 109 +++++++++++++++++++++++++++++++++++++++------- 6 files changed, 152 insertions(+), 16 deletions(-) create mode 100644 editandresend.cpp create mode 100644 editandresend.h create mode 100644 editandresend.ui diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e97434..f471428 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/editandresend.cpp b/editandresend.cpp new file mode 100644 index 0000000..77fd9c3 --- /dev/null +++ b/editandresend.cpp @@ -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; +} diff --git a/editandresend.h b/editandresend.h new file mode 100644 index 0000000..17325de --- /dev/null +++ b/editandresend.h @@ -0,0 +1,22 @@ +#ifndef EDITANDRESEND_H +#define EDITANDRESEND_H + +#include + +namespace Ui { +class EditAndResend; +} + +class EditAndResend : public QDialog +{ + Q_OBJECT + +public: + explicit EditAndResend(QWidget *parent = nullptr); + ~EditAndResend(); + +private: + Ui::EditAndResend *ui; +}; + +#endif // EDITANDRESEND_H diff --git a/editandresend.ui b/editandresend.ui new file mode 100644 index 0000000..d4244c2 --- /dev/null +++ b/editandresend.ui @@ -0,0 +1,19 @@ + + + EditAndResend + + + + 0 + 0 + 459 + 354 + + + + Dialog + + + + + diff --git a/historymodel.h b/historymodel.h index bed6295..b4b0c97 100644 --- a/historymodel.h +++ b/historymodel.h @@ -3,6 +3,7 @@ #include #include #include +#include struct HistoryItem { int id = -1; diff --git a/mainwindow.ui b/mainwindow.ui index 93b2ff4..e5c21ca 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -92,6 +92,11 @@ 50 + + + DejaVu Sans Mono + + @@ -137,15 +142,50 @@ 100 + + + DejaVu Sans Mono + + + + true + + + + + + DejaVu Sans Mono + + + + true + - Qt::Vertical - - + + + + DejaVu Sans Mono + + + + true + + + + + + DejaVu Sans Mono + + + + true + + @@ -171,7 +211,7 @@ - + 0 0 @@ -180,7 +220,19 @@ - + + QLayout::SetMaximumSize + + + QFormLayout::AllNonFixedFieldsGrow + + + QFormLayout::WrapLongRows + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + @@ -188,6 +240,11 @@ 0 + + + DejaVu Sans + + all @@ -220,29 +277,49 @@ - - - - - + + - + 0 0 + + + DejaVu Sans + + + + + + + + + 0 + 1 + + - 300 - 0 + 778 + 134 1 - 0 + 1 + + + DejaVu Sans Mono + + + + QAbstractScrollArea::AdjustToContents + true @@ -259,7 +336,7 @@ true - 19 + 21 @@ -276,7 +353,7 @@ 0 0 818 - 20 + 22