summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/ui
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-09-04 13:06:56 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-12-19 17:05:13 -0300
commit98c874503e14b40896a63ea36b86d39edccb8b30 (patch)
treecd2fbcbc665fe9879d70445223f74abce1fd9d09 /src/leap/bitmask/gui/ui
parent6378638e94df93c3a13f10adc3b6946f6b132be0 (diff)
Refactor login usage.
- factor out the signal tracking code as a helper class, - move login logic from MainWindow to LoginWidget, - add new signals to the LoginWidget to interact with MainWindow, - add login sequence docs to LoginWidget class, - improve docs for login methods, - add LoginState class to handle login states, - disable login button until data is entered, - move some properties and actions to .ui file.
Diffstat (limited to 'src/leap/bitmask/gui/ui')
-rw-r--r--src/leap/bitmask/gui/ui/login.ui51
1 files changed, 47 insertions, 4 deletions
diff --git a/src/leap/bitmask/gui/ui/login.ui b/src/leap/bitmask/gui/ui/login.ui
index bfd5f9c0..9ee9a283 100644
--- a/src/leap/bitmask/gui/ui/login.ui
+++ b/src/leap/bitmask/gui/ui/login.ui
@@ -29,12 +29,12 @@
<string notr="true"/>
</property>
<layout class="QGridLayout" name="gridLayout">
- <property name="margin">
- <number>0</number>
- </property>
<property name="verticalSpacing">
<number>6</number>
</property>
+ <property name="margin">
+ <number>0</number>
+ </property>
<item row="2" column="0">
<spacer name="horizontalSpacer_2">
<property name="orientation">
@@ -71,6 +71,9 @@
</property>
<item row="3" column="1">
<widget class="QPushButton" name="btnLogin">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -134,6 +137,9 @@
<property name="inputMask">
<string/>
</property>
+ <property name="echoMode">
+ <enum>QLineEdit::Password</enum>
+ </property>
</widget>
</item>
</layout>
@@ -283,10 +289,47 @@
</customwidget>
</customwidgets>
<tabstops>
+ <tabstop>lnUser</tabstop>
+ <tabstop>lnPassword</tabstop>
<tabstop>chkRemember</tabstop>
+ <tabstop>btnLogin</tabstop>
+ <tabstop>btnLogout</tabstop>
</tabstops>
<resources>
<include location="../../../../../data/resources/icons.qrc"/>
</resources>
- <connections/>
+ <connections>
+ <connection>
+ <sender>lnPassword</sender>
+ <signal>returnPressed()</signal>
+ <receiver>btnLogin</receiver>
+ <slot>click()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>212</x>
+ <y>171</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>169</x>
+ <y>234</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>lnUser</sender>
+ <signal>returnPressed()</signal>
+ <receiver>lnPassword</receiver>
+ <slot>setFocus()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>309</x>
+ <y>140</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>304</x>
+ <y>163</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>