add files from main project

This commit is contained in:
pengfei.zhou
2019-12-04 15:51:46 +08:00
parent 2ca38388f3
commit dbdd1770ef
19 changed files with 579 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#ifndef SINGLETON_H
#define SINGLETON_H
#include <QDebug>
class Singleton
{
private:
static Singleton *local_instance;
Singleton() {
qDebug() << "constructor";
}
~Singleton() {
qDebug() << "destructor";
}
public:
static Singleton *getInstance() {
static Singleton locla_s;
return &locla_s;
}
};
#endif // SINGLETON_H