jack.h

来自「压缩包里有教材<<C++模式设计-基于QT4开源跨平台开发框架&gt」· C头文件 代码 · 共 38 行

H
38
字号
#ifndef JACK_H#define JACK_H#include <QThread>#include <QQueue>#include <QStringList>/* Jack is a trespasser in the giant's realm. All he does is   search for stuff to steal from the giant. His search steps go into a   fifo queue. If he finds something he says so and the giant can sort of hear him.  This demonstrates how to use queues   as a means of passing messages between threads.    */class Jack :public QThread {    Q_OBJECTpublic:    Jack();    void run();public slots:    void setDelay(int newDelay);    void killGiant();signals:    void chopBeanstalk();private:    QQueue<QString> m_Fifo;    int m_Delay;    bool m_BeanstalkChopped;            QStringList m_Stuff;  // list of stuff to steal};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?