Cleaner flashing code (#774)
This commit is contained in:
@@ -444,6 +444,16 @@ void WindowManager::save()
|
||||
file.flush();
|
||||
}
|
||||
|
||||
void WindowManager::sendAlert()
|
||||
{
|
||||
int flashDuration = 2500;
|
||||
if (getSettings()->longAlerts) {
|
||||
flashDuration = 0;
|
||||
}
|
||||
QApplication::alert(getApp()->windows->getMainWindow().window(),
|
||||
flashDuration);
|
||||
}
|
||||
|
||||
void WindowManager::encodeNodeRecusively(SplitNode *node, QJsonObject &obj)
|
||||
{
|
||||
switch (node->getType()) {
|
||||
|
||||
@@ -61,6 +61,8 @@ public:
|
||||
|
||||
pajlada::Signals::NoArgSignal wordFlagsChanged;
|
||||
|
||||
void sendAlert();
|
||||
|
||||
private:
|
||||
void encodeNodeRecusively(SplitContainer::Node *node, QJsonObject &obj);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user