Changeset View
Changeset View
Standalone View
Standalone View
kded/output.h
Show All 12 Lines | |||||
13 | 13 | | |||
14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | *********************************************************************/ | 16 | *********************************************************************/ | ||
17 | #ifndef KDED_OUTPUT_H | 17 | #ifndef KDED_OUTPUT_H | ||
18 | #define KDED_OUTPUT_H | 18 | #define KDED_OUTPUT_H | ||
19 | 19 | | |||
20 | #include "../common/control.h" | 20 | #include "../common/control.h" | ||
21 | #include "../common/globals.h" | ||||
21 | 22 | | |||
22 | #include <kscreen/types.h> | 23 | #include <kscreen/types.h> | ||
23 | 24 | | |||
25 | #include <QOrientationReading> | ||||
24 | #include <QVariantMap> | 26 | #include <QVariantMap> | ||
25 | 27 | | |||
26 | class Output | 28 | class Output | ||
27 | { | 29 | { | ||
28 | public: | 30 | public: | ||
29 | static void readInOutputs(KScreen::ConfigPtr config, const QVariantList &outputsInfo); | 31 | static void readInOutputs(KScreen::ConfigPtr config, const QVariantList &outputsInfo); | ||
30 | 32 | | |||
31 | static void writeGlobal(const KScreen::OutputPtr &output); | 33 | static void writeGlobal(const KScreen::OutputPtr &output); | ||
32 | static bool writeGlobalPart(const KScreen::OutputPtr &output, QVariantMap &info, | 34 | static bool writeGlobalPart(const KScreen::OutputPtr &output, QVariantMap &info, | ||
33 | const KScreen::OutputPtr &fallback); | 35 | const KScreen::OutputPtr &fallback); | ||
34 | 36 | | |||
35 | static QString dirPath(); | 37 | static QString dirPath(); | ||
36 | 38 | | |||
39 | static bool updateOrientation(KScreen::OutputPtr &output, | ||||
40 | QOrientationReading::Orientation orientation); | ||||
41 | | ||||
37 | private: | 42 | private: | ||
38 | static QString globalFileName(const QString &hash); | 43 | static QString globalFileName(const QString &hash); | ||
39 | static QVariantMap getGlobalData(KScreen::OutputPtr output); | 44 | static QVariantMap getGlobalData(KScreen::OutputPtr output); | ||
40 | 45 | | |||
41 | static void readIn(KScreen::OutputPtr output, const QVariantMap &info, Control::OutputRetention retention); | 46 | static void readIn(KScreen::OutputPtr output, const QVariantMap &info, Control::OutputRetention retention); | ||
42 | static bool readInGlobal(KScreen::OutputPtr output); | 47 | static bool readInGlobal(KScreen::OutputPtr output); | ||
43 | static void readInGlobalPartFromInfo(KScreen::OutputPtr output, const QVariantMap &info); | 48 | static void readInGlobalPartFromInfo(KScreen::OutputPtr output, const QVariantMap &info); | ||
44 | | ||||
45 | /* | 49 | /* | ||
46 | * When a global output value (scale, rotation) is changed we might | 50 | * When a global output value (scale, rotation) is changed we might | ||
47 | * need to reposition the outputs when another config is read. | 51 | * need to reposition the outputs when another config is read. | ||
48 | */ | 52 | */ | ||
49 | static void adjustPositions(KScreen::ConfigPtr config, const QVariantList &outputsInfo); | 53 | static void adjustPositions(KScreen::ConfigPtr config, const QVariantList &outputsInfo); | ||
50 | 54 | | |||
51 | static QString s_dirName; | 55 | static QString s_dirName; | ||
52 | }; | 56 | }; | ||
53 | 57 | | |||
54 | #endif | 58 | #endif |