1 /* vi: set sw=4 ts=4: 2 * 3 * Copyright (C) 2001 - 2007 Christian Hohnstaedt. 4 * 5 * All rights reserved. 6 */ 7 8 #ifndef __PASS_INFO_H 9 #define __PASS_INFO_H 10 11 #include <QString> 12 #include <QObject> 13 #include <QApplication> 14 15 #include "lib/exception.h" 16 17 class QWidget; 18 19 class pass_info: public QObject 20 { 21 Q_OBJECT 22 23 private: 24 QString title; 25 QString description; 26 QWidget *widget; 27 QString type; 28 QString pixmap; 29 enum open_result result; 30 31 public: 32 pass_info(const QString &t, const QString &d, QWidget *w = NULL); getTitle()33 QString getTitle() const 34 { 35 return title; 36 } getDescription()37 QString getDescription() const 38 { 39 return description; 40 } getWidget()41 QWidget *getWidget() 42 { 43 if (!widget) 44 widget = qApp->activeWindow(); 45 return widget; 46 } getType()47 QString getType() const 48 { 49 return type; 50 } getImage()51 QString getImage() const 52 { 53 return pixmap; 54 } getResult()55 enum open_result getResult() const 56 { 57 return result; 58 } setTitle(QString t)59 void setTitle(QString t) 60 { 61 title = t; 62 } setDescription(QString d)63 void setDescription(QString d) 64 { 65 description = d; 66 } setWidget(QWidget * w)67 void setWidget(QWidget *w) 68 { 69 widget = w; 70 } setResult(enum open_result r)71 void setResult(enum open_result r) 72 { 73 result = r; 74 } 75 void setPin(); 76 }; 77 78 #endif 79