mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 20:40:29 +08:00
Settings for text messages, ascending or descending (latest first/last)
This commit is contained in:
committed by
Mat Sutcliffe
parent
00941afcf9
commit
f20855b613
@@ -74,12 +74,13 @@ namespace BlackGui
|
||||
QString CTextMessageSettings::convertToQString(bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
return QStringLiteral("Private: %1 supervisor: %2 frequency: %3 all: %4 focus: %5").arg(
|
||||
return QStringLiteral("Private: %1 supervisor: %2 frequency: %3 all: %4 focus: %5 latest 1st: %6").arg(
|
||||
boolToOnOff(this->getPopupPrivateMessages()),
|
||||
boolToOnOff(this->getPopupSupervisorMessages()),
|
||||
boolToOnOff(this->getPopupFrequencyMessages()),
|
||||
boolToOnOff(this->getPopupAllMessages()),
|
||||
boolToYesNo(this->focusOverlayWindow())
|
||||
boolToYesNo(this->focusOverlayWindow()),
|
||||
boolToYesNo(this->isLatestFirst())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -94,8 +95,9 @@ namespace BlackGui
|
||||
case IndexPopupPrivateMessages: return CVariant::fromValue(this->popupPrivateMessages());
|
||||
case IndexPopupSupervisorMessages: return CVariant::fromValue(this->popupSupervisorMessages());
|
||||
case IndexPopupSelcalMessages: return CVariant::fromValue(this->popupSelcalMessages());
|
||||
case IndexStyle: return CVariant::fromValue(this->getStyleSheet());
|
||||
case IndexFocus: return CVariant::fromValue(this->focusOverlayWindow());
|
||||
case IndexStyle: return CVariant::fromValue(this->getStyleSheet());
|
||||
case IndexLatestFirst: return CVariant::fromValue(this->isLatestFirst());
|
||||
case IndexFocus: return CVariant::fromValue(this->focusOverlayWindow());
|
||||
default: return CValueObject::propertyByIndex(index);
|
||||
}
|
||||
}
|
||||
@@ -111,8 +113,9 @@ namespace BlackGui
|
||||
case IndexPopupSupervisorMessages: this->setSupervisorMessages(variant.toBool()); break;
|
||||
case IndexPopupPrivateMessages: this->setPopupPrivateMessages(variant.toBool()); break;
|
||||
case IndexPopupSelcalMessages: this->setPopupSelcalMessages(variant.toBool()); break;
|
||||
case IndexFocus: this->setFocusOverlayWindows(variant.toBool()); break;
|
||||
case IndexStyle: this->setStyleSheet(variant.toQString()); break;
|
||||
case IndexFocus: this->setFocusOverlayWindows(variant.toBool()); break;
|
||||
case IndexLatestFirst: this->setLatestFirst(variant.toBool()); break;
|
||||
case IndexStyle: this->setStyleSheet(variant.toQString()); break;
|
||||
default: CValueObject::setPropertyByIndex(index, variant); break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace BlackGui
|
||||
IndexPopupAllMessages,
|
||||
IndexPopupSelcalMessages,
|
||||
IndexFocus,
|
||||
IndexLatestFirst,
|
||||
IndexStyle
|
||||
};
|
||||
|
||||
@@ -95,6 +96,12 @@ namespace BlackGui
|
||||
//! Popup the given message? Complete check including frequencies.
|
||||
bool popup(const BlackMisc::Network::CTextMessage &textMessage, const BlackMisc::Simulation::CSimulatedAircraft &ownAircraft) const;
|
||||
|
||||
//! Latest messages 1st?
|
||||
bool isLatestFirst() const { return m_latestFirst; }
|
||||
|
||||
//! Latest messages 1st?
|
||||
void setLatestFirst(bool latestFirst) { m_latestFirst = latestFirst; }
|
||||
|
||||
//! CSS style sheet
|
||||
const QString &getStyleSheet() const { return m_styleSheet; }
|
||||
|
||||
@@ -126,6 +133,7 @@ namespace BlackGui
|
||||
bool m_popupAllMessages = false;
|
||||
bool m_popupSelcalMessages = true;
|
||||
bool m_focus = true;
|
||||
bool m_latestFirst = false; //!< latest messages first
|
||||
QString m_styleSheet;
|
||||
|
||||
BLACK_METACLASS(
|
||||
@@ -135,6 +143,8 @@ namespace BlackGui
|
||||
BLACK_METAMEMBER(popupFrequencyMessages),
|
||||
BLACK_METAMEMBER(popupAllMessages),
|
||||
BLACK_METAMEMBER(popupSelcalMessages),
|
||||
BLACK_METAMEMBER(focus),
|
||||
BLACK_METAMEMBER(latestFirst),
|
||||
BLACK_METAMEMBER(styleSheet)
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user