1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
qTox/src/loginscreen.ui
Colomban Wendling 5f34a959fc refactor: replace CapsLockIndicator with new PasswordEdit widget
Introduce a new PasswordEdit widget extending QLineEdit that takes care
of all the specifics of a QLineEntry when it is used to input a
password, including echo mode and caps lock indicator.

Also optimize the event handling to only listen to global events when
it is actually needed, e.g. when a password field is actually visible.
2016-06-17 21:55:27 +02:00

438 lines
12 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LoginScreen</class>
<widget class="QWidget" name="LoginScreen">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>410</width>
<height>200</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>410</width>
<height>200</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>415</width>
<height>200</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">qTox</string>
</property>
<property name="windowIcon">
<iconset resource="../res.qrc">
<normaloff>:/img/icons/qtox.svg</normaloff>:/img/icons/qtox.svg</iconset>
</property>
<widget class="QStackedWidget" name="stackedWidget">
<property name="geometry">
<rect>
<x>160</x>
<y>0</y>
<width>250</width>
<height>200</height>
</rect>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="newPage">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="labelNewProfile">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<layout class="QFormLayout" name="formLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="formAlignment">
<set>Qt::AlignCenter</set>
</property>
<property name="horizontalSpacing">
<number>9</number>
</property>
<property name="verticalSpacing">
<number>9</number>
</property>
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Username:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="newUsername">
<property name="maxLength">
<number>64</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Password:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="PasswordEdit" name="newPass"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Confirm:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="PasswordEdit" name="newPassConfirm"/>
</item>
<item row="7" column="0" colspan="2">
<widget class="QProgressBar" name="passStrengthMeter">
<property name="value">
<number>0</number>
</property>
<property name="format">
<string>Password strength: %p%</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="createAccountButton">
<property name="text">
<string>Create Profile</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" colspan="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="loginPage">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="labelLoadProfile">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="userNameLabel">
<property name="text">
<string>Username:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="loginUsernames"/>
</item>
<item>
<widget class="QLabel" name="loginPasswordLabel">
<property name="text">
<string>Password:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="loginPassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="autoLoginCB">
<property name="toolTip">
<string>If the profile does not have a password, qTox can skip the login screen</string>
</property>
<property name="text">
<string>Load automatically</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QPushButton" name="importButton">
<property name="text">
<string>Import</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="loginButton">
<property name="text">
<string>Load</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
<widget class="Line" name="line">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>135</width>
<height>1</height>
</rect>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<widget class="QPushButton" name="newProfilePgbtn">
<property name="geometry">
<rect>
<x>0</x>
<y>130</y>
<width>160</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>New Profile</string>
</property>
</widget>
<widget class="QPushButton" name="loginPgbtn">
<property name="geometry">
<rect>
<x>0</x>
<y>170</y>
<width>160</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Load Profile</string>
</property>
</widget>
<widget class="QLabel" name="label_7">
<property name="geometry">
<rect>
<x>30</x>
<y>15</y>
<width>100</width>
<height>100</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../res.qrc">:/img/login_logo.svg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>PasswordEdit</class>
<extends>QLineEdit</extends>
<header>src/widget/passwordedit.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../res.qrc"/>
</resources>
<connections/>
</ui>