1 #ifndef VCARDPHOTODLG_H 2 #define VCARDPHOTODLG_H 3 4 #include <QLabel> 5 #include <QDialog> 6 #include <QToolBar> 7 8 class ShowPhotoDlg : public QDialog 9 { 10 Q_OBJECT 11 public: 12 ShowPhotoDlg(QWidget *parent, QPixmap &pixmap); 13 private: 14 QDialog *showPhotoDlg; 15 QLabel *label; 16 QPixmap photoPixmap; 17 QToolBar *toolbar; 18 QAction *saveAct; 19 QAction *restoreAct; 20 bool initSize; 21 void createActions(); 22 void updatePhoto(const QSize size); 23 protected: 24 void resizeEvent(QResizeEvent *event); 25 void wheelEvent(QWheelEvent * event); 26 private slots: 27 void save(); 28 void restore(); 29 }; 30 31 #endif 32