mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 05:23:06 +00:00
feat(MainWindow): supports account status
This commit is contained in:
parent
c0bb3fcb3f
commit
21cb2767c5
8 changed files with 72 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# ====================================================================
|
||||
# languages/CMakeLists.txt
|
||||
# assets/languages/CMakeLists.txt
|
||||
# ====================================================================
|
||||
|
||||
# This line prevent `.ts` files deletion.
|
||||
|
|
|
|||
|
|
@ -216,6 +216,10 @@
|
|||
<source>contactsEntry</source>
|
||||
<translation>Contacts</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>autoAnswerStatus</source>
|
||||
<translation>auto</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ManageAccounts</name>
|
||||
|
|
|
|||
|
|
@ -216,6 +216,10 @@
|
|||
<source>contactsEntry</source>
|
||||
<translation>Contacts</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>autoAnswerStatus</source>
|
||||
<translation>auto</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ManageAccounts</name>
|
||||
|
|
|
|||
|
|
@ -26,3 +26,7 @@ Presence::PresenceStatus AccountSettingsModel::getPresenceStatus () const {
|
|||
QString AccountSettingsModel::getSipAddress () const {
|
||||
return QString("e.miller@sip-linphone.org");
|
||||
}
|
||||
|
||||
bool AccountSettingsModel::getAutoAnswerStatus () const {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ class AccountSettingsModel : public QObject {
|
|||
CONSTANT
|
||||
);
|
||||
|
||||
Q_PROPERTY(
|
||||
bool autoAnswerStatus
|
||||
READ getAutoAnswerStatus
|
||||
CONSTANT
|
||||
);
|
||||
|
||||
public:
|
||||
AccountSettingsModel (QObject *parent = Q_NULLPTR);
|
||||
|
||||
|
|
@ -45,6 +51,8 @@ private:
|
|||
Presence::PresenceStatus getPresenceStatus () const;
|
||||
|
||||
QString getSipAddress () const;
|
||||
|
||||
bool getAutoAnswerStatus () const;
|
||||
};
|
||||
|
||||
#endif // ACCOUNT_SETTINGS_MODEL_H_
|
||||
|
|
|
|||
|
|
@ -31,14 +31,16 @@ QtObject {
|
|||
// OK.
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
property color g: '#6B7A86'
|
||||
property color g10: '#1A6b7a86'
|
||||
property color g20: '#336b7a86'
|
||||
property color h: '#687680'
|
||||
property color i: '#FE5E00'
|
||||
property color j: '#4B5964'
|
||||
property color c: '#CBCBCB'
|
||||
property color g: '#6B7A86'
|
||||
property color g10: '#1A6B7A86'
|
||||
property color g20: '#336B7A86'
|
||||
property color h: '#687680'
|
||||
property color i: '#FE5E00'
|
||||
property color j: '#4B5964'
|
||||
property color j75: '#BF4B5964'
|
||||
property color k: '#FFFFFF'
|
||||
property color k: '#FFFFFF'
|
||||
property color k50: '#32FFFFFF'
|
||||
property color u: '#B1B1B1'
|
||||
property color u: '#B1B1B1'
|
||||
property color v: '#E2E2E2'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,29 @@ ApplicationWindow {
|
|||
Layout.preferredWidth: MainWindowStyle.accountStatus.width
|
||||
}
|
||||
|
||||
Column {
|
||||
width: MainWindowStyle.autoAnswerStatus.width
|
||||
|
||||
Icon {
|
||||
icon: AccountSettingsModel.autoAnswerStatus
|
||||
? 'auto_answer_active'
|
||||
: 'auto_answer_inactive'
|
||||
iconSize: MainWindowStyle.autoAnswerStatus.iconSize
|
||||
}
|
||||
|
||||
Text {
|
||||
clip: true
|
||||
font {
|
||||
pointSize: MainWindowStyle.autoAnswerStatus.text.fontSize
|
||||
}
|
||||
text: qsTr('autoAnswerStatus')
|
||||
width: parent.width
|
||||
color: AccountSettingsModel.autoAnswerStatus
|
||||
? MainWindowStyle.autoAnswerStatus.text.color.enabled
|
||||
: MainWindowStyle.autoAnswerStatus.text.color.disabled
|
||||
}
|
||||
}
|
||||
|
||||
SearchBox {
|
||||
id: searchBox
|
||||
|
||||
|
|
@ -127,7 +150,7 @@ ApplicationWindow {
|
|||
Timeline {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
model: ContactsListModel {}
|
||||
model: ContactsListModel {} // Use History list.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
pragma Singleton
|
||||
import QtQuick 2.7
|
||||
|
||||
import Common 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
QtObject {
|
||||
|
|
@ -12,6 +14,20 @@ QtObject {
|
|||
property int width: 200
|
||||
}
|
||||
|
||||
property QtObject autoAnswerStatus: QtObject {
|
||||
property int iconSize: 13
|
||||
property int width: 24
|
||||
|
||||
property QtObject text: QtObject {
|
||||
property int fontSize: 8
|
||||
|
||||
property QtObject color: QtObject {
|
||||
property color enabled: Colors.i
|
||||
property color disabled: Colors.c
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property QtObject menu: QtObject {
|
||||
property int entryHeight: 50
|
||||
property int width: 250
|
||||
|
|
@ -29,7 +45,7 @@ QtObject {
|
|||
property int spacing: 20
|
||||
|
||||
property var background: Rectangle {
|
||||
color: '#E2E2E2'
|
||||
color: Colors.v
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue