svgui
1.9
|
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 00002 00003 /* 00004 Sonic Visualiser 00005 An audio file viewer and annotation editor. 00006 Centre for Digital Music, Queen Mary, University of London. 00007 This file copyright 2007 QMUL. 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License as 00011 published by the Free Software Foundation; either version 2 of the 00012 License, or (at your option) any later version. See the file 00013 COPYING included with this distribution for more information. 00014 */ 00015 00016 #ifndef _IMAGE_DIALOG_H_ 00017 #define _IMAGE_DIALOG_H_ 00018 00019 #include <QDialog> 00020 #include <QString> 00021 00022 class QLineEdit; 00023 class QLabel; 00024 class QPushButton; 00025 class FileSource; 00026 00027 class ImageDialog : public QDialog 00028 { 00029 Q_OBJECT 00030 00031 public: 00032 ImageDialog(QString title, 00033 QString image = "", 00034 QString label = "", 00035 QWidget *parent = 0); 00036 virtual ~ImageDialog(); 00037 00038 QString getImage(); 00039 QPixmap getPixmap(); 00040 QString getLabel(); 00041 00042 signals: 00043 void imageChanged(QString image); 00044 void labelChanged(QString label); 00045 00046 public slots: 00047 void setImage(QString image); 00048 void setLabel(QString label); 00049 void updatePreview(); 00050 00051 protected slots: 00052 void browseClicked(); 00053 void imageEditEdited(const QString &); 00054 void imageEditEdited(); 00055 00056 protected: 00057 void resizeEvent(QResizeEvent *); 00058 00059 QLineEdit *m_imageEdit; 00060 QLineEdit *m_labelEdit; 00061 QLabel *m_imagePreview; 00062 00063 QString m_loadedImageFile; 00064 QPixmap m_loadedImage; 00065 00066 QPushButton *m_okButton; 00067 00068 FileSource *m_remoteFile; 00069 }; 00070 00071 #endif