diff --git a/src/TuxManager.pro b/src/TuxManager.pro index 8c36ee4..61a1236 100644 --- a/src/TuxManager.pro +++ b/src/TuxManager.pro @@ -10,6 +10,7 @@ TARGET = tux-manager #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ + aboutwindow.cpp \ colorschemedialog.cpp \ colorscheme.cpp \ main.cpp \ @@ -43,6 +44,7 @@ SOURCES += \ perf/memorydetailwidget.cpp HEADERS += \ + aboutwindow.h \ colorschemedialog.h \ colorscheme.h \ mainwindow.h \ @@ -75,6 +77,7 @@ HEADERS += \ perf/memorydetailwidget.h FORMS += \ + aboutwindow.ui \ colorschemedialog.ui \ mainwindow.ui \ processeswidget.ui \ diff --git a/src/aboutwindow.cpp b/src/aboutwindow.cpp new file mode 100644 index 0000000..2d6372a --- /dev/null +++ b/src/aboutwindow.cpp @@ -0,0 +1,19 @@ +#include "aboutwindow.h" +#include "ui_aboutwindow.h" + +AboutWindow::AboutWindow(QWidget *parent) + : QDialog(parent) + , ui(new Ui::AboutWindow) +{ + ui->setupUi(this); +} + +AboutWindow::~AboutWindow() +{ + delete ui; +} + +void AboutWindow::on_closeButton_clicked() +{ + this->close(); +} diff --git a/src/aboutwindow.h b/src/aboutwindow.h new file mode 100644 index 0000000..3416233 --- /dev/null +++ b/src/aboutwindow.h @@ -0,0 +1,26 @@ +#ifndef ABOUTWINDOW_H +#define ABOUTWINDOW_H + +#include + +namespace Ui { +class AboutWindow; +} + +class AboutWindow : public QDialog +{ + Q_OBJECT + +public: + explicit AboutWindow(QWidget *parent = nullptr); + ~AboutWindow(); + +private: + Ui::AboutWindow *ui; + +private slots: + void on_closeButton_clicked(); + +}; + +#endif // ABOUTWINDOW_H diff --git a/src/aboutwindow.ui b/src/aboutwindow.ui new file mode 100644 index 0000000..78d9afe --- /dev/null +++ b/src/aboutwindow.ui @@ -0,0 +1,170 @@ + + + AboutWindow + + + + 0 + 0 + 500 + 400 + + + + + 0 + 0 + + + + + 500 + 400 + + + + + 500 + 400 + + + + About TuxManager + + + + + 391 + 349 + 91 + 31 + + + + Close + + + + + + + + + 30 + 30 + 91 + 81 + + + + + + + :/tux_manager_icon_vector.svg + + + true + + + + + + 140 + 30 + 331 + 41 + + + + + 22 + + + + Tux Manager + + + Qt::TextFormat::PlainText + + + false + + + + + + 140 + 70 + 331 + 41 + + + + Created by Petr Bena + + + + + + 20 + 20 + 461 + 101 + + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + + 20 + 330 + 461 + 20 + + + + Qt::Orientation::Horizontal + + + + + + 20 + 130 + 461 + 201 + + + + + 11 + + + + A Linux Task Manager alternative built with Qt6, inspired by the Windows Task Manager but designed to go further - providing deep visibility into system processes, performance metrics, users, and services.<br><br><a href="https://github.com/benapetr/TuxManager">https://github.com/benapetr/TuxManager</a><br><br>License - GPL-3.0-or-later + + + Qt::TextFormat::RichText + + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop + + + true + + + true + + + + + + + + diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 249b3b4..cc0a2f2 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -19,6 +19,7 @@ #include "mainwindow.h" #include "ui_mainwindow.h" #include "configuration.h" +#include "aboutwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) @@ -42,6 +43,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) this->ui->tabWidget->setCurrentIndex(CFG->ActiveTab); this->updateTabActivity(this->ui->tabWidget->currentIndex()); + // Keep ActiveTab in sync as the user switches tabs connect(this->ui->tabWidget, &QTabWidget::currentChanged, this, [this](int index) { @@ -71,3 +73,17 @@ void MainWindow::updateTabActivity(int index) this->m_usersWidget->SetActive(index == 2); this->m_servicesWidget->SetActive(index == 3); } + +void MainWindow::on_actionAbout_triggered() +{ + // Create an instance of the About Dialog + AboutWindow about(this); + + // Open as modal window + about.exec(); +} + +void MainWindow::on_actionExit_triggered() +{ + qApp->quit(); +} diff --git a/src/mainwindow.h b/src/mainwindow.h index 8dfac47..7502bd2 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -53,5 +53,9 @@ class MainWindow : public QMainWindow PerformanceWidget *m_performanceWidget; UsersWidget *m_usersWidget; ServicesWidget *m_servicesWidget; + + private slots: + void on_actionAbout_triggered(); + void on_actionExit_triggered(); }; #endif // MAINWINDOW_H diff --git a/src/mainwindow.ui b/src/mainwindow.ui index dbf6686..bf4f0d3 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -118,10 +118,48 @@ 0 0 900 - 19 + 27 + + + Help + + + + + + File + + + + + + + + + + + About + + + + + + + + Exit + + + + + true + + + Always On Top + + diff --git a/src/resources.qrc b/src/resources.qrc index c22cd44..b842db3 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -1,5 +1,6 @@ tux_manager_256.ico + tux_manager_icon_vector.svg diff --git a/src/tux_manager_256.ico b/src/tux_manager_256.ico index 932420a..aa160bf 100644 Binary files a/src/tux_manager_256.ico and b/src/tux_manager_256.ico differ diff --git a/src/tux_manager_icon_vector.svg b/src/tux_manager_icon_vector.svg new file mode 100644 index 0000000..5bab357 --- /dev/null +++ b/src/tux_manager_icon_vector.svg @@ -0,0 +1,341 @@ + + + +TUXMAN