mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
feat(ui/views/App/Settings/SettingsCallsChat): supports auto answer delay
This commit is contained in:
parent
391a975931
commit
1e83bd74b3
3 changed files with 28 additions and 0 deletions
|
|
@ -42,6 +42,19 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
|
|||
// Chat & calls.
|
||||
// =============================================================================
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
int SettingsModel::getAutoAnswerDelay () const {
|
||||
return m_config->getInt(UI_SECTION, "auto_answer_delay", 0);
|
||||
}
|
||||
|
||||
void SettingsModel::setAutoAnswerDelay (int delay) {
|
||||
m_config->setInt(UI_SECTION, "auto_answer_delay", delay);
|
||||
emit autoAnswerDelayChanged(delay);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
bool SettingsModel::getAutoAnswerStatus () const {
|
||||
return !!m_config->getInt(UI_SECTION, "auto_answer", 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ class SettingsModel : public QObject {
|
|||
// Chat & calls. -------------------------------------------------------------
|
||||
|
||||
Q_PROPERTY(bool autoAnswerStatus READ getAutoAnswerStatus WRITE setAutoAnswerStatus NOTIFY autoAnswerStatusChanged);
|
||||
Q_PROPERTY(int autoAnswerDelay READ getAutoAnswerDelay WRITE setAutoAnswerDelay NOTIFY autoAnswerDelayChanged);
|
||||
|
||||
Q_PROPERTY(QString fileTransferUrl READ getFileTransferUrl WRITE setFileTransferUrl NOTIFY fileTransferUrlChanged);
|
||||
|
||||
Q_PROPERTY(bool limeIsSupported READ getLimeIsSupported CONSTANT);
|
||||
|
|
@ -114,6 +116,9 @@ public:
|
|||
bool getAutoAnswerStatus () const;
|
||||
void setAutoAnswerStatus (bool status);
|
||||
|
||||
int getAutoAnswerDelay () const;
|
||||
void setAutoAnswerDelay (int delay);
|
||||
|
||||
QString getFileTransferUrl () const;
|
||||
void setFileTransferUrl (const QString &url);
|
||||
|
||||
|
|
@ -199,6 +204,8 @@ signals:
|
|||
// Chat & calls. -------------------------------------------------------------
|
||||
|
||||
void autoAnswerStatusChanged (bool status);
|
||||
void autoAnswerDelayChanged (int delay);
|
||||
|
||||
void fileTransferUrlChanged (const QString &url);
|
||||
|
||||
void mediaEncryptionChanged (MediaEncryption encryption);
|
||||
|
|
|
|||
|
|
@ -68,6 +68,14 @@ TabContainer {
|
|||
|
||||
NumericField {
|
||||
readOnly: !autoAnswer.checked
|
||||
|
||||
minValue: 0
|
||||
maxValue: 30000
|
||||
step: 1000
|
||||
|
||||
text: SettingsModel.autoAnswerDelay
|
||||
|
||||
onEditingFinished: SettingsModel.autoAnswerDelay = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue