Changeset View
Changeset View
Standalone View
Standalone View
src/qml/ElisaMainWindow.qml
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU Library General Public License | 14 | * You should have received a copy of the GNU Library General Public License | ||
15 | * along with this library; see the file COPYING.LIB. If not, write to | 15 | * along with this library; see the file COPYING.LIB. If not, write to | ||
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | * Boston, MA 02110-1301, USA. | 17 | * Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.7 | 20 | import QtQuick 2.7 | ||
21 | import QtQuick.Controls 2.2 | 21 | import QtQuick.Controls 2.3 | ||
22 | import QtQuick.Controls 1.4 as Controls1 | | |||
23 | import QtQuick.Layouts 1.1 | 22 | import QtQuick.Layouts 1.1 | ||
24 | import QtQuick.Window 2.2 | 23 | import QtQuick.Window 2.2 | ||
25 | import org.kde.elisa 1.0 | 24 | import org.kde.elisa 1.0 | ||
26 | import Qt.labs.settings 1.0 | 25 | import Qt.labs.settings 1.0 | ||
27 | 26 | | |||
28 | ApplicationWindow { | 27 | ApplicationWindow { | ||
29 | id: mainWindow | 28 | id: mainWindow | ||
30 | 29 | | |||
Show All 10 Lines | |||||
41 | width: persistentSettings.width | 40 | width: persistentSettings.width | ||
42 | height: persistentSettings.height | 41 | height: persistentSettings.height | ||
43 | 42 | | |||
44 | title: i18n("Elisa") | 43 | title: i18n("Elisa") | ||
45 | 44 | | |||
46 | property var goBackAction: elisa.action("go_back") | 45 | property var goBackAction: elisa.action("go_back") | ||
47 | property var findAction: elisa.action("edit_find") | 46 | property var findAction: elisa.action("edit_find") | ||
48 | 47 | | |||
49 | Controls1.Action { | 48 | Action { | ||
50 | shortcut: findAction.shortcut | 49 | shortcut: findAction.shortcut | ||
51 | onTriggered: { | 50 | onTriggered: { | ||
52 | if ( persistentSettings.expandedFilterView == true) | 51 | if ( persistentSettings.expandedFilterView == true) | ||
53 | { | 52 | { | ||
54 | persistentSettings.expandedFilterView = false | 53 | persistentSettings.expandedFilterView = false | ||
55 | } else { | 54 | } else { | ||
56 | persistentSettings.expandedFilterView = true | 55 | persistentSettings.expandedFilterView = true | ||
57 | } | 56 | } | ||
58 | } | 57 | } | ||
59 | } | 58 | } | ||
60 | 59 | | |||
61 | Controls1.Action { | 60 | Action { | ||
62 | shortcut: goBackAction.shortcut | 61 | shortcut: goBackAction.shortcut | ||
63 | onTriggered: contentView.goBack() | 62 | onTriggered: contentView.goBack() | ||
64 | } | 63 | } | ||
65 | 64 | | |||
66 | Controls1.Action { | | |||
67 | id: applicationMenuAction | | |||
68 | text: i18nc("open application menu", "Application Menu") | | |||
69 | iconName: "application-menu" | | |||
70 | onTriggered: applicationMenu.popup() | | |||
71 | } | | |||
72 | | ||||
73 | ApplicationMenu { | 65 | ApplicationMenu { | ||
74 | id: applicationMenu | 66 | id: applicationMenu | ||
75 | } | 67 | } | ||
76 | 68 | | |||
77 | SystemPalette { | 69 | SystemPalette { | ||
78 | id: myPalette | 70 | id: myPalette | ||
79 | colorGroup: SystemPalette.Active | 71 | colorGroup: SystemPalette.Active | ||
80 | } | 72 | } | ||
Show All 23 Lines | 78 | Settings { | |||
104 | property bool expandedFilterView: false | 96 | property bool expandedFilterView: false | ||
105 | 97 | | |||
106 | property bool showPlaylist: true | 98 | property bool showPlaylist: true | ||
107 | 99 | | |||
108 | property bool headerBarIsMaximized: false | 100 | property bool headerBarIsMaximized: false | ||
109 | } | 101 | } | ||
110 | 102 | | |||
111 | Connections { | 103 | Connections { | ||
104 | target: headerBar.playerControl | ||||
105 | onOpenMenu: applicationMenu.popup() | ||||
106 | } | ||||
107 | | ||||
108 | Connections { | ||||
112 | target: Qt.application | 109 | target: Qt.application | ||
113 | onAboutToQuit: | 110 | onAboutToQuit: | ||
114 | { | 111 | { | ||
115 | persistentSettings.x = mainWindow.x; | 112 | persistentSettings.x = mainWindow.x; | ||
116 | persistentSettings.y = mainWindow.y; | 113 | persistentSettings.y = mainWindow.y; | ||
117 | persistentSettings.width = mainWindow.width; | 114 | persistentSettings.width = mainWindow.width; | ||
118 | persistentSettings.height = mainWindow.height; | 115 | persistentSettings.height = mainWindow.height; | ||
119 | 116 | | |||
▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines |