12345678910111213141516171819202122232425262728293031 |
- #ifndef SINGLETONAWESOME_H
- #define SINGLETONAWESOME_H
- #include "QtAwesome.h"
- #include <QApplication>
- class SingletonAwesome
- {
- public:
- static SingletonAwesome &instance()
- {
- static SingletonAwesome qinstance;
- return qinstance;
- }
- QtAwesome *awesome() const { return m_awesome; }
- private:
- SingletonAwesome()
- {
- m_awesome = new QtAwesome(qApp);
- m_awesome->initFontAwesome();
- }
- SingletonAwesome(const SingletonAwesome &) = delete;
- SingletonAwesome &operator=(const SingletonAwesome &) = delete;
- QtAwesome *m_awesome = nullptr;
- };
- #endif // SINGLETONAWESOME_H
|