Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/TuxManager.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -43,6 +44,7 @@ SOURCES += \
perf/memorydetailwidget.cpp

HEADERS += \
aboutwindow.h \
colorschemedialog.h \
colorscheme.h \
mainwindow.h \
Expand Down Expand Up @@ -75,6 +77,7 @@ HEADERS += \
perf/memorydetailwidget.h

FORMS += \
aboutwindow.ui \
colorschemedialog.ui \
mainwindow.ui \
processeswidget.ui \
Expand Down
19 changes: 19 additions & 0 deletions src/aboutwindow.cpp
Original file line number Diff line number Diff line change
@@ -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();
}
26 changes: 26 additions & 0 deletions src/aboutwindow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef ABOUTWINDOW_H
#define ABOUTWINDOW_H

#include <QDialog>

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
170 changes: 170 additions & 0 deletions src/aboutwindow.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutWindow</class>
<widget class="QDialog" name="AboutWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>400</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>500</width>
<height>400</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>500</width>
<height>400</height>
</size>
</property>
<property name="windowTitle">
<string>About TuxManager</string>
</property>
<widget class="QPushButton" name="closeButton">
<property name="geometry">
<rect>
<x>391</x>
<y>349</y>
<width>91</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Close</string>
</property>
<property name="icon">
<iconset theme="QIcon::ThemeIcon::WindowClose"/>
</property>
</widget>
<widget class="QLabel" name="Icon">
<property name="geometry">
<rect>
<x>30</x>
<y>30</y>
<width>91</width>
<height>81</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="resources.qrc">:/tux_manager_icon_vector.svg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>140</x>
<y>30</y>
<width>331</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>22</pointsize>
</font>
</property>
<property name="text">
<string>Tux Manager</string>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::PlainText</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>140</x>
<y>70</y>
<width>331</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string> Created by Petr Bena</string>
</property>
</widget>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>461</width>
<height>101</height>
</rect>
</property>
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
</widget>
<widget class="Line" name="line">
<property name="geometry">
<rect>
<x>20</x>
<y>330</y>
<width>461</width>
<height>20</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>20</x>
<y>130</y>
<width>461</width>
<height>201</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>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.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://github.com/benapetr/TuxManager&quot;&gt;https://github.com/benapetr/TuxManager&lt;/a&gt;&lt;br&gt;&lt;br&gt;License - GPL-3.0-or-later</string>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</widget>
<resources>
<include location="resources.qrc"/>
</resources>
<connections/>
</ui>
16 changes: 16 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
{
Expand Down Expand Up @@ -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();
}
4 changes: 4 additions & 0 deletions src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
40 changes: 39 additions & 1 deletion src/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,48 @@
<x>0</x>
<y>0</y>
<width>900</width>
<height>19</height>
<height>27</height>
</rect>
</property>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>Help</string>
</property>
<addaction name="actionAbout"/>
</widget>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
<addaction name="actionExit"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuHelp"/>
</widget>
<action name="actionAbout">
<property name="icon">
<iconset theme="QIcon::ThemeIcon::HelpAbout"/>
</property>
<property name="text">
<string>About</string>
</property>
</action>
<action name="actionExit">
<property name="icon">
<iconset theme="QIcon::ThemeIcon::ApplicationExit"/>
</property>
<property name="text">
<string>Exit</string>
</property>
</action>
<action name="actionOnTop">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Always On Top</string>
</property>
</action>
</widget>
<resources/>
<connections/>
Expand Down
1 change: 1 addition & 0 deletions src/resources.qrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<RCC>
<qresource prefix="/">
<file alias="tux_manager_256.ico">tux_manager_256.ico</file>
<file>tux_manager_icon_vector.svg</file>
</qresource>
</RCC>
Binary file modified src/tux_manager_256.ico
Binary file not shown.
Loading