-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathawesomeservice.cpp
More file actions
29 lines (23 loc) · 800 Bytes
/
awesomeservice.cpp
File metadata and controls
29 lines (23 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "awesomeservice.h"
#include <QtAwesome.h>
AwesomeService* AwesomeService::s_instance = NULL;
void AwesomeService::create(QObject *parent)
{
Q_ASSERT(s_instance == NULL);
s_instance = new AwesomeService(parent);
}
QtAwesome *AwesomeService::awesome()
{
Q_ASSERT(s_instance != NULL);
return s_instance->_awesome;
}
AwesomeService::AwesomeService(QObject *parent) : QObject(parent)
{
_awesome = new QtAwesome(this);
_awesome->initFontAwesome();
_awesome->setDefaultOption("scale-factor", 0.8);
_awesome->setDefaultOption("color", QColor(100,50,70));
_awesome->setDefaultOption("color-disabled", QColor(70,70,70));
_awesome->setDefaultOption("color-active", QColor(180,60,80));
_awesome->setDefaultOption("color-selected", QColor(200,70,90));
}