Changeset View
Changeset View
Standalone View
Standalone View
Modules/about-distro/src/Module.h
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | Copyright (C) 2012 Harald Sitter <apachelogger@ubuntu.com> | 2 | Copyright (C) 2012-2020 Harald Sitter <sitter@kde.org> | ||
3 | 3 | | |||
4 | This program is free software; you can redistribute it and/or | 4 | This program is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU General Public License as | 5 | modify it under the terms of the GNU General Public License as | ||
6 | published by the Free Software Foundation; either version 2 of | 6 | published by the Free Software Foundation; either version 2 of | ||
7 | the License or (at your option) version 3 or any later version | 7 | the License or (at your option) version 3 or any later version | ||
8 | accepted by the membership of KDE e.V. (or its successor approved | 8 | accepted by the membership of KDE e.V. (or its successor approved | ||
9 | by the membership of KDE e.V.), which shall act as a proxy | 9 | by the membership of KDE e.V.), which shall act as a proxy | ||
10 | defined in Section 14 of version 3 of the license. | 10 | defined in Section 14 of version 3 of the license. | ||
Show All 11 Lines | |||||
22 | #define MODULE_H | 22 | #define MODULE_H | ||
23 | 23 | | |||
24 | #include <KCModule> | 24 | #include <KCModule> | ||
25 | 25 | | |||
26 | namespace Ui { | 26 | namespace Ui { | ||
27 | class Module; | 27 | class Module; | ||
28 | } | 28 | } | ||
29 | 29 | | |||
30 | class QLabel; | 30 | class Entry; | ||
31 | 31 | | |||
32 | class Module : public KCModule | 32 | class Module : public KCModule | ||
33 | { | 33 | { | ||
34 | Q_OBJECT | 34 | Q_OBJECT | ||
35 | public: | 35 | public: | ||
36 | /** | 36 | /** | ||
37 | * Constructor. | 37 | * Constructor. | ||
38 | * | 38 | * | ||
Show All 18 Lines | |||||
57 | void save() override; | 57 | void save() override; | ||
58 | 58 | | |||
59 | /** | 59 | /** | ||
60 | * Overloading the KCModule defaults() function. | 60 | * Overloading the KCModule defaults() function. | ||
61 | */ | 61 | */ | ||
62 | void defaults() override; | 62 | void defaults() override; | ||
63 | 63 | | |||
64 | private: | 64 | private: | ||
65 | void loadSoftware(); | 65 | // Load os-release data into UI. | ||
66 | void loadHardware(); | 66 | void loadOSData(); | ||
67 | // Load generic entries into UI. | ||||
68 | void loadEntries(); | ||||
67 | 69 | | |||
68 | /** | 70 | // Copy data dump to clipboard | ||
69 | * Copies the software and hardware information to clipboard. | | |||
70 | */ | | |||
71 | void copyToClipboard(); | 71 | void copyToClipboard(); | ||
72 | // Same as copyToClipboard but in en_US when the system language | ||||
73 | // is something else | ||||
72 | void copyToClipboardInEnglish(); | 74 | void copyToClipboardInEnglish(); | ||
73 | 75 | | |||
74 | QVector<QPair<QLabel*, QLabel*> > labelsForClipboard; | | |||
75 | QString englishTextForClipboard; | | |||
76 | | ||||
77 | /** | 76 | /** | ||
78 | * UI | 77 | * UI | ||
79 | */ | 78 | */ | ||
80 | Ui::Module *ui = nullptr; | 79 | Ui::Module *ui = nullptr; | ||
81 | 80 | | |||
82 | /** \returns Version of plasmashell or an empty string when none was found */ | 81 | /*** Description entries for dumping into textual form. Already excludes invalids. */ | ||
83 | QString plasmaVersion() const; | 82 | std::vector<const Entry *> m_entries; | ||
84 | }; | 83 | }; | ||
85 | 84 | | |||
86 | #endif // MODULE_H | 85 | #endif // MODULE_H |