14 Star 44 Fork 8

zjzdy/Offline-small-search

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
custom_obj.h 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
zjzdy 提交于 2015-09-05 15:27 . Update custom gui.
#ifndef CUSTOM_OBJ_H
#define CUSTOM_OBJ_H
#include <QObject>
#include <QDir>
#include <QFile>
#include <QString>
#include <QDataStream>
class custom_obj : public QObject
{
Q_OBJECT
Q_PROPERTY(QString bgi READ bgi WRITE setBgi NOTIFY bgiChanged)
Q_PROPERTY(QString bgc READ bgc WRITE setBgc NOTIFY bgcChanged)
Q_PROPERTY(int max_history READ max_history WRITE setMax_history NOTIFY max_historyChanged)
public:
explicit custom_obj(QObject *parent = 0);
QString bgi() const;
void setBgi(const QString & bgi);
QString bgc() const;
void setBgc(const QString & bgc);
int max_history() const;
void setMax_history(const int & max_history);
Q_INVOKABLE void write_custom(QString file_path = "");
Q_INVOKABLE void read_custom(QString file_path = "");
Q_SIGNALS:
void bgiChanged(const QString & bgi);
void bgcChanged(const QString & bgc);
void max_historyChanged(const int & max_history);
private:
QString m_bgi;
QString m_bgc;
int m_max_history;
};
#endif // CUSTOM_OBJ_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/zjzdy/Offline-small-search.git
git@gitee.com:zjzdy/Offline-small-search.git
zjzdy
Offline-small-search
Offline-small-search
master

搜索帮助