Changeset View
Changeset View
Standalone View
Standalone View
plasmoid/package/contents/ui/FullRepresentation.qml
Show All 13 Lines | |||||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. | ||
16 | * | 16 | * | ||
17 | * You should have received a copy of the GNU General Public License | 17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | import QtQuick 2.1 | 21 | import QtQuick 2.1 | ||
22 | import QtQuick.Layouts 1.1 | ||||
22 | import org.kde.plasma.core 2.0 as PlasmaCore | 23 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
23 | import org.kde.plasma.components 2.0 as PlasmaComponents | 24 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
24 | import org.kde.plasma.extras 2.0 as PlasmaExtras | 25 | import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
25 | import org.kde.kdeconnect 1.0 as KdeConnect | 26 | import org.kde.kdeconnect 1.0 as KdeConnect | ||
26 | 27 | | |||
27 | Item { | 28 | Item { | ||
28 | id: kdeconnect | 29 | id: kdeconnect | ||
29 | property alias devicesModel: devicesView.model | 30 | property alias devicesModel: devicesView.model | ||
30 | 31 | | |||
31 | PlasmaExtras.Heading { | 32 | RowLayout { | ||
33 | visible: devicesView.count==0 | ||||
32 | width: parent.width | 34 | width: parent.width | ||
35 | | ||||
36 | PlasmaExtras.Heading { | ||||
37 | Layout.fillWidth: true | ||||
33 | level: 3 | 38 | level: 3 | ||
34 | opacity: 0.6 | 39 | opacity: 0.6 | ||
35 | text: i18n("No paired devices available") | 40 | text: i18n("No paired devices available") | ||
36 | visible: devicesView.count==0 | 41 | } | ||
42 | | ||||
43 | PlasmaComponents.Button { | ||||
44 | iconSource: "view-refresh" | ||||
45 | tooltip: i18n("Search for devices") | ||||
46 | | ||||
47 | onClicked: { | ||||
48 | KdeConnect.DaemonDbusInterface.forceOnNetworkChange(); | ||||
49 | } | ||||
50 | } | ||||
37 | } | 51 | } | ||
38 | 52 | | |||
39 | /* | 53 | /* | ||
40 | //Startup arguments | 54 | //Startup arguments | ||
41 | PlasmaComponents.Label { | 55 | PlasmaComponents.Label { | ||
42 | visible: (startupArguments.length > 0) | 56 | visible: (startupArguments.length > 0) | ||
43 | text: (""+startupArguments) | 57 | text: (""+startupArguments) | ||
44 | anchors.fill: parent | 58 | anchors.fill: parent | ||
45 | } | 59 | } | ||
46 | */ | 60 | */ | ||
47 | 61 | | |||
48 | PlasmaExtras.ScrollArea { | 62 | PlasmaExtras.ScrollArea { | ||
49 | id: dialogItem | 63 | id: dialogItem | ||
50 | anchors.fill: parent | 64 | anchors.fill: parent | ||
65 | visible: devicesView.count > 0 | ||||
51 | 66 | | |||
52 | ListView { | 67 | ListView { | ||
53 | id: devicesView | 68 | id: devicesView | ||
54 | anchors.fill: parent | 69 | anchors.fill: parent | ||
55 | delegate: DeviceDelegate { } | 70 | delegate: DeviceDelegate { } | ||
56 | } | 71 | } | ||
57 | } | 72 | } | ||
58 | } | 73 | } |