mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +00:00
implement about window
This commit is contained in:
parent
9e82210463
commit
c18bb61521
218
sources/3rdparty/about/about.ui
vendored
Normal file
218
sources/3rdparty/about/about.ui
vendored
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>About</class>
|
||||||
|
<widget class="QWidget" name="About">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>450</width>
|
||||||
|
<height>359</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab_About">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>About</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QScrollArea" name="scrollArea_about">
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_about">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>418</width>
|
||||||
|
<height>284</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_name">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::TextBrowserInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_version">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::TextBrowserInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_description">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignJustify|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::TextBrowserInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_links">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::RichText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::TextBrowserInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="spacer_about">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_ackn">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Acknowledgement</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QScrollArea" name="scrollArea_ackn">
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_ackn">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>418</width>
|
||||||
|
<height>284</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_translators">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::TextBrowserInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_trdparty">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::TextBrowserInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="spacer_ackn">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>229</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_license">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::RichText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::TextBrowserInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
2
sources/3rdparty/tasks
vendored
2
sources/3rdparty/tasks
vendored
@ -1 +1 @@
|
|||||||
Subproject commit d4e154aa948b82cee2d41b145763ffd9d9ec3ca7
|
Subproject commit 230bdecd2c18ee2ec5350d94778a51158565c119
|
@ -23,7 +23,7 @@ file (RELATIVE_PATH SUBPROJECT_DESKTOP ${CMAKE_SOURCE_DIR} ${SUBPROJECT_DESKTOP_
|
|||||||
file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp
|
file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp
|
||||||
${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp)
|
${PROJECT_TRDPARTY_DIR}/fontdialog/*.cpp)
|
||||||
set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
|
set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h)
|
||||||
file (GLOB SUBPROJECT_UI *.ui)
|
file (GLOB SUBPROJECT_UI *.ui ${PROJECT_TRDPARTY_DIR}/about/*.ui)
|
||||||
file (GLOB SUBPROJECT_NOTIFY *.notifyrc)
|
file (GLOB SUBPROJECT_NOTIFY *.notifyrc)
|
||||||
|
|
||||||
# prepare
|
# prepare
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include <Plasma/DataEngine>
|
#include <Plasma/DataEngine>
|
||||||
#include <Plasma/ToolTipContent>
|
#include <Plasma/ToolTipContent>
|
||||||
|
|
||||||
|
#include <ui_about.h>
|
||||||
#include <ui_advanced.h>
|
#include <ui_advanced.h>
|
||||||
#include <ui_appearance.h>
|
#include <ui_appearance.h>
|
||||||
#include <ui_deconfig.h>
|
#include <ui_deconfig.h>
|
||||||
@ -121,6 +122,7 @@ private:
|
|||||||
Plasma::DataEngine *sysmonEngine;
|
Plasma::DataEngine *sysmonEngine;
|
||||||
Plasma::DataEngine *timeEngine;
|
Plasma::DataEngine *timeEngine;
|
||||||
// configuration interface
|
// configuration interface
|
||||||
|
Ui::About uiAboutConfig;
|
||||||
Ui::AdvancedWindow uiAdvancedConfig;
|
Ui::AdvancedWindow uiAdvancedConfig;
|
||||||
Ui::AppearanceWindow uiAppConfig;
|
Ui::AppearanceWindow uiAppConfig;
|
||||||
Ui::ConfigWindow uiWidConfig;
|
Ui::ConfigWindow uiWidConfig;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <fontdialog/fontdialog.h>
|
#include <fontdialog/fontdialog.h>
|
||||||
#include <pdebug/pdebug.h>
|
#include <pdebug/pdebug.h>
|
||||||
#include <task/taskadds.h>
|
#include <task/taskadds.h>
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
|
|
||||||
QMap<QString, QString> AwesomeWidget::readDataEngineConfiguration()
|
QMap<QString, QString> AwesomeWidget::readDataEngineConfiguration()
|
||||||
@ -139,6 +140,8 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
|
|||||||
uiDEConfig.setupUi(deConfigWidget);
|
uiDEConfig.setupUi(deConfigWidget);
|
||||||
QWidget *tooltipWidget = new QWidget;
|
QWidget *tooltipWidget = new QWidget;
|
||||||
uiTooltipConfig.setupUi(tooltipWidget);
|
uiTooltipConfig.setupUi(tooltipWidget);
|
||||||
|
QWidget *aboutWidget = new QWidget;
|
||||||
|
uiAboutConfig.setupUi(aboutWidget);
|
||||||
|
|
||||||
//widget
|
//widget
|
||||||
uiWidConfig.textEdit_elements->setPlainText(configuration[QString("text")]);
|
uiWidConfig.textEdit_elements->setPlainText(configuration[QString("text")]);
|
||||||
@ -402,11 +405,34 @@ void AwesomeWidget::createConfigurationInterface(KConfigDialog *parent)
|
|||||||
uiDEConfig.comboBox_playerSelect->setCurrentIndex(
|
uiDEConfig.comboBox_playerSelect->setCurrentIndex(
|
||||||
uiDEConfig.comboBox_playerSelect->findText(deSettings[QString("PLAYER")], Qt::MatchFixedString));
|
uiDEConfig.comboBox_playerSelect->findText(deSettings[QString("PLAYER")], Qt::MatchFixedString));
|
||||||
|
|
||||||
|
// about
|
||||||
|
uiAboutConfig.label_name->setText(QString(NAME));
|
||||||
|
uiAboutConfig.label_version->setText(i18n("Version %1\n(build date %2)", QString(VERSION), QString(BUILD_DATE)));
|
||||||
|
uiAboutConfig.label_description->setText(i18n("A set of minimalistic plasmoid widgets"));
|
||||||
|
uiAboutConfig.label_links->setText(i18n("Links:") + QString("<br>") +
|
||||||
|
QString("<a href=\"%1\">%2</a><br>").arg(QString(HOMEPAGE)).arg(i18n("Homepage")) +
|
||||||
|
QString("<a href=\"%1\">%2</a><br>").arg(QString(REPOSITORY)).arg(i18n("Repository")) +
|
||||||
|
QString("<a href=\"%1\">%2</a><br>").arg(QString(BUGTRACKER)).arg(i18n("Bugtracker")) +
|
||||||
|
QString("<a href=\"%1\">%2</a><br>").arg(QString(TRANSLATION)).arg(i18n("Translation issue")) +
|
||||||
|
QString("<a href=\"%1\">%2</a>").arg(QString(AUR_PACKAGES)).arg(i18n("AUR packages")));
|
||||||
|
uiAboutConfig.label_license->setText(QString("<small>© %1 <a href=\"mailto:%2\">%3</a><br>").arg(QString(DATE)).arg(QString(EMAIL)).arg(QString(AUTHOR)) +
|
||||||
|
i18n("This software is licensed under %1", QString(LICENSE)) + QString("</small>"));
|
||||||
|
// 2nd tab
|
||||||
|
QStringList trdPartyList = QString(TRDPARTY_LICENSE).split(QChar(';'), QString::SkipEmptyParts);
|
||||||
|
for (int i=0; i<trdPartyList.count(); i++)
|
||||||
|
trdPartyList[i] = QString("<a href=\"%3\">%1</a> (%2 license)")
|
||||||
|
.arg(trdPartyList[i].split(QChar(','))[0])
|
||||||
|
.arg(trdPartyList[i].split(QChar(','))[1])
|
||||||
|
.arg(trdPartyList[i].split(QChar(','))[2]);
|
||||||
|
uiAboutConfig.label_translators->setText(i18n("Translators: %1", QString(TRANSLATORS)));
|
||||||
|
uiAboutConfig.label_trdparty->setText(i18n("This software uses: %1", trdPartyList.join(QString(", "))));
|
||||||
|
|
||||||
parent->addPage(configWidget, i18n("Widget"), Applet::icon());
|
parent->addPage(configWidget, i18n("Widget"), Applet::icon());
|
||||||
parent->addPage(advWidget, i18n("Advanced"), QString("system-run"));
|
parent->addPage(advWidget, i18n("Advanced"), QString("system-run"));
|
||||||
parent->addPage(tooltipWidget, i18n("Tooltip"), QString("preferences-desktop-color"));
|
parent->addPage(tooltipWidget, i18n("Tooltip"), QString("preferences-desktop-color"));
|
||||||
parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme"));
|
parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme"));
|
||||||
parent->addPage(deConfigWidget, i18n("DataEngine"), QString("utilities-system-monitor"));
|
parent->addPage(deConfigWidget, i18n("DataEngine"), QString("utilities-system-monitor"));
|
||||||
|
parent->addPage(aboutWidget, i18n("About"), QString("help-about"));
|
||||||
|
|
||||||
connect(uiAdvancedConfig.listWidget_fanDevice, SIGNAL(itemActivated(QListWidgetItem *)),
|
connect(uiAdvancedConfig.listWidget_fanDevice, SIGNAL(itemActivated(QListWidgetItem *)),
|
||||||
this, SLOT(editFanItem(QListWidgetItem *)));
|
this, SLOT(editFanItem(QListWidgetItem *)));
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#define NAME "Awesome Widgets"
|
#define NAME "Awesome Widgets"
|
||||||
#define VERSION "@PROJECT_VERSION@"
|
#define VERSION "@PROJECT_VERSION@"
|
||||||
#define AUTHOR "@PROJECT_AUTHOR@"
|
#define AUTHOR "@PROJECT_AUTHOR@"
|
||||||
#define TRANSLATORS "Ernesto Avilés Vzqz (Spanish),Mermouy (French),underr (Brazillian Portuguese),Виктор Слободян (Ukrainian),Lemueler (Chinese)"
|
#define TRANSLATORS "Ernesto Aviles Vzqz (Spanish);Mermouy (French);underr (Brazillian Portuguese);Viktor Slobodyan (Ukrainian);Lemueler (Chinese)"
|
||||||
#define EMAIL "@PROJECT_CONTACT@"
|
#define EMAIL "@PROJECT_CONTACT@"
|
||||||
#define LICENSE "@PROJECT_LICENSE@"
|
#define LICENSE "@PROJECT_LICENSE@"
|
||||||
#define TRDPARTY_LICENSE "tasks,BSD,https://github.com/mhogomchungu/tasks"
|
#define TRDPARTY_LICENSE "tasks,BSD,https://github.com/mhogomchungu/tasks"
|
||||||
|
Loading…
Reference in New Issue
Block a user