mirror of
				https://github.com/Icinga/icinga2.git
				synced 2025-11-03 21:25:56 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			620 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			620 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef __HIREDIS_EXAMPLE_QT_H
 | 
						|
#define __HIREDIS_EXAMPLE_QT_H
 | 
						|
 | 
						|
#include <adapters/qt.h>
 | 
						|
 | 
						|
class ExampleQt : public QObject {
 | 
						|
 | 
						|
    Q_OBJECT
 | 
						|
 | 
						|
    public:
 | 
						|
        ExampleQt(const char * value, QObject * parent = 0)
 | 
						|
            : QObject(parent), m_value(value) {}
 | 
						|
 | 
						|
    signals:
 | 
						|
        void finished();
 | 
						|
 | 
						|
    public slots:
 | 
						|
        void run();
 | 
						|
 | 
						|
    private:
 | 
						|
        void finish() { emit finished(); }
 | 
						|
 | 
						|
    private:
 | 
						|
        const char * m_value;
 | 
						|
        redisAsyncContext * m_ctx;
 | 
						|
        RedisQtAdapter m_adapter;
 | 
						|
 | 
						|
    friend
 | 
						|
    void getCallback(redisAsyncContext *, void *, void *);
 | 
						|
};
 | 
						|
 | 
						|
#endif /* !__HIREDIS_EXAMPLE_QT_H */
 |