# HG changeset patch # User Dirk Olmes # Date 1411429464 -7200 # Node ID d8958cb11043e503b971ef3ae3702a4d286b2300 # Parent 07d74b88ac8d658415d7b1268497c59bca24c366 allow editing the title diff -r 07d74b88ac8d -r d8958cb11043 RemoteViewer/Connection.py --- a/RemoteViewer/Connection.py Mon Sep 22 06:11:22 2014 +0200 +++ b/RemoteViewer/Connection.py Tue Sep 23 01:44:24 2014 +0200 @@ -23,6 +23,10 @@ def __str__(self): return 'connection "{}" of type {} to {} with user {} and geometry {}'.format(self.title, self.type, self.host, self.user, self.geometry) + def setTitle(self, title): + '''This is a slot that is connected to a signal in the GUI''' + self.title = title + def setType(self, type): '''This is a slot that is connected to a signal in the GUI''' self.type = type @@ -46,6 +50,7 @@ return self.host def validate(self): + # TODO: implement proper validation pass def toJson(self): diff -r 07d74b88ac8d -r d8958cb11043 RemoteViewer/ConnectionDialog.py --- a/RemoteViewer/ConnectionDialog.py Mon Sep 22 06:11:22 2014 +0200 +++ b/RemoteViewer/ConnectionDialog.py Tue Sep 23 01:44:24 2014 +0200 @@ -20,6 +20,7 @@ self.ui.type.addItem('vnc') def __connectConnection(self): + self.ui.title.textChanged.connect(self.connection.setTitle) self.ui.type.activated[str].connect(self.connection.setType) self.ui.hostname.textChanged.connect(self.connection.setHost) self.ui.username.textChanged.connect(self.connection.setUser) diff -r 07d74b88ac8d -r d8958cb11043 RemoteViewer/ConnectionDialog.ui --- a/RemoteViewer/ConnectionDialog.ui Mon Sep 22 06:11:22 2014 +0200 +++ b/RemoteViewer/ConnectionDialog.ui Tue Sep 23 01:44:24 2014 +0200 @@ -7,14 +7,14 @@ 0 0 400 - 181 + 212 - + Type: @@ -24,10 +24,10 @@ - + - + Host: @@ -37,10 +37,10 @@ - + - + User: @@ -50,7 +50,7 @@ - + Geometry: @@ -60,10 +60,10 @@ - + - + Qt::Horizontal @@ -73,9 +73,22 @@ - + + + + + Title: + + + title + + + + + +