diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 11 | ||||
-rw-r--r-- | src/mainwindow.cpp | 23 | ||||
-rw-r--r-- | src/mainwindow.h | 25 | ||||
-rw-r--r-- | src/mainwindow.ui | 173 |
4 files changed, 232 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..fd3e533 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" + +#include <QApplication> + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + return a.exec(); +} diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp new file mode 100644 index 0000000..156df67 --- /dev/null +++ b/src/mainwindow.cpp @@ -0,0 +1,23 @@ +#include "mainwindow.h" +#include "./ui_mainwindow.h" + +#include <QMessageBox> + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) + , ui(new Ui::MainWindow) +{ + ui->setupUi(this); + QMetaObject::connectSlotsByName(this); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + +void MainWindow::on_actionOpen_triggered(bool checked) { + QMessageBox msgBox; + msgBox.setText("It works!"); + msgBox.exec(); +} diff --git a/src/mainwindow.h b/src/mainwindow.h new file mode 100644 index 0000000..c2ab2b3 --- /dev/null +++ b/src/mainwindow.h @@ -0,0 +1,25 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include <QMainWindow> +#include <qobjectdefs.h> + +QT_BEGIN_NAMESPACE +namespace Ui { class MainWindow; } +QT_END_NAMESPACE + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private slots: + void on_actionOpen_triggered(bool checked); + +private: + Ui::MainWindow *ui; +}; +#endif // MAINWINDOW_H diff --git a/src/mainwindow.ui b/src/mainwindow.ui new file mode 100644 index 0000000..3e949cf --- /dev/null +++ b/src/mainwindow.ui @@ -0,0 +1,173 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>800</width> + <height>600</height> + </rect> + </property> + <property name="windowTitle"> + <string>Actor Viewer</string> + </property> + <widget class="QWidget" name="centralwidget"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QListWidget" name="listWidget"/> + </item> + <item> + <widget class="QTextBrowser" name="textBrowser"> + <property name="html"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Select Status to display from list.</span></p></body></html></string> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QMenuBar" name="menubar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>800</width> + <height>30</height> + </rect> + </property> + <widget class="QMenu" name="menuFile"> + <property name="title"> + <string>File</string> + </property> + <addaction name="actionOpen"/> + <addaction name="actionQuit"/> + </widget> + <widget class="QMenu" name="menuHelp"> + <property name="title"> + <string>Help</string> + </property> + <addaction name="actionAbout"/> + </widget> + <widget class="QMenu" name="menuView"> + <property name="title"> + <string>View</string> + </property> + <addaction name="actionAll_toots"/> + <addaction name="actionPublic_toots"/> + <addaction name="actionUnlisted_toots"/> + <addaction name="actionPrivate_toots"/> + <addaction name="actionDirect_messages"/> + <addaction name="separator"/> + <addaction name="actionOnly_with_attachment"/> + </widget> + <addaction name="menuFile"/> + <addaction name="menuView"/> + <addaction name="menuHelp"/> + </widget> + <widget class="QStatusBar" name="statusbar"/> + <action name="actionOpen"> + <property name="checkable"> + <bool>false</bool> + </property> + <property name="text"> + <string>Open...</string> + </property> + <property name="iconText"> + <string>Open...</string> + </property> + <property name="toolTip"> + <string>Open...</string> + </property> + <property name="statusTip"> + <string>Open a Mastodon data archive</string> + </property> + <property name="shortcut"> + <string>Ctrl+O</string> + </property> + </action> + <action name="actionQuit"> + <property name="text"> + <string>Quit</string> + </property> + <property name="shortcut"> + <string>Ctrl+Q</string> + </property> + <property name="menuRole"> + <enum>QAction::QuitRole</enum> + </property> + </action> + <action name="actionAbout"> + <property name="text"> + <string>About</string> + </property> + <property name="menuRole"> + <enum>QAction::AboutRole</enum> + </property> + </action> + <action name="actionAll_toots"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="text"> + <string>All toots</string> + </property> + </action> + <action name="actionPublic_toots"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>Public toots</string> + </property> + </action> + <action name="actionUnlisted_toots"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>Unlisted toots</string> + </property> + </action> + <action name="actionPrivate_toots"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>Private toots</string> + </property> + </action> + <action name="actionDirect_messages"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>Direct messages</string> + </property> + </action> + <action name="actionOnly_with_attachment"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>Only with attachment</string> + </property> + <property name="statusTip"> + <string>Only list toots that have an attachment</string> + </property> + </action> + </widget> + <tabstops> + <tabstop>listWidget</tabstop> + <tabstop>textBrowser</tabstop> + </tabstops> + <resources/> + <connections/> +</ui> |