From 54fb499518660e1013bb5d256d1fa14e2c294bf0 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Fri, 1 Feb 2019 15:53:07 -0500 Subject: [PATCH] Added baseline message history window --- CMakeLists.txt | 2 + mainwindow.cpp | 1 + messagewindow.cpp | 18 ++++++ messagewindow.h | 22 +++++++ messagewindow.ui | 146 ++++++++++++++++++++++++++++++++++++++++++++++ wsjtx.pro | 9 ++- 6 files changed, 195 insertions(+), 3 deletions(-) create mode 100644 messagewindow.cpp create mode 100644 messagewindow.h create mode 100644 messagewindow.ui diff --git a/CMakeLists.txt b/CMakeLists.txt index 8abd6e9..bba73af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -244,6 +244,7 @@ set (wsjtx_CXXSRCS keyeater.cpp APRSISClient.cpp Inbox.cpp + messagewindow.cpp mainwindow.cpp Configuration.cpp main.cpp @@ -547,6 +548,7 @@ set (wsjt_qt_UISRCS set (wsjtx_UISRCS mainwindow.ui + messagewindow.ui about.ui astro.ui echograph.ui diff --git a/mainwindow.cpp b/mainwindow.cpp index 4234746..19c4c63 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -66,6 +66,7 @@ #include "jsc.h" #include "jsc_checker.h" #include "Inbox.h" +#include "messagewindow.h" #include "ui_mainwindow.h" #include "moc_mainwindow.cpp" diff --git a/messagewindow.cpp b/messagewindow.cpp new file mode 100644 index 0000000..f197beb --- /dev/null +++ b/messagewindow.cpp @@ -0,0 +1,18 @@ +#include "messagewindow.h" +#include "ui_messagewindow.h" + +MessageWindow::MessageWindow(QWidget *parent) : + QWidget(parent), + ui(new Ui::MessageWindow) +{ + ui->setupUi(this); + + this->setWindowTitle("Message History"); + + ui->messageTableWidget->resizeColumnsToContents(); +} + +MessageWindow::~MessageWindow() +{ + delete ui; +} diff --git a/messagewindow.h b/messagewindow.h new file mode 100644 index 0000000..a4594a1 --- /dev/null +++ b/messagewindow.h @@ -0,0 +1,22 @@ +#ifndef MESSAGEWINDOW_H +#define MESSAGEWINDOW_H + +#include + +namespace Ui { +class MessageWindow; +} + +class MessageWindow : public QWidget +{ + Q_OBJECT + +public: + explicit MessageWindow(QWidget *parent = 0); + ~MessageWindow(); + +private: + Ui::MessageWindow *ui; +}; + +#endif // MESSAGEWINDOW_H diff --git a/messagewindow.ui b/messagewindow.ui new file mode 100644 index 0000000..343dceb --- /dev/null +++ b/messagewindow.ui @@ -0,0 +1,146 @@ + + + MessageWindow + + + + 0 + 0 + 800 + 600 + + + + Form + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + Qt::Vertical + + + 6 + + + + + 0 + 4 + + + + true + + + QAbstractItemView::SelectRows + + + 10 + + + true + + + + + + + AlignCenter + + + + + Date + + + + + From + + + + + Message + + + + + + + 0 + 1 + + + + + 14 + + + + QTextEdit { background-color:#ffeaa7; } + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 30 + + + + Reply + + + + + + + + + + + diff --git a/wsjtx.pro b/wsjtx.pro index 8f68b8f..11062d9 100644 --- a/wsjtx.pro +++ b/wsjtx.pro @@ -80,7 +80,8 @@ SOURCES += \ jsc_map.cpp \ jsc_checker.cpp \ Message.cpp \ - Inbox.cpp + Inbox.cpp \ + messagewindow.cpp HEADERS += qt_helpers.hpp \ pimpl_h.hpp pimpl_impl.hpp \ @@ -111,7 +112,8 @@ HEADERS += qt_helpers.hpp \ jsc.h \ jsc_checker.h \ Message.h \ - Inbox.h + Inbox.h \ + messagewindow.h INCLUDEPATH += qmake_only @@ -124,7 +126,8 @@ HEADERS += OmniRigTransceiver.hpp FORMS += mainwindow.ui about.ui Configuration.ui widegraph.ui astro.ui \ logqso.ui wf_palette_design_dialog.ui messageaveraging.ui echograph.ui \ fastgraph.ui \ - messagereplydialog.ui + messagereplydialog.ui \ + messagewindow.ui RC_FILE = wsjtx.rc RESOURCES = wsjtx.qrc