annotate widgets/ImageDialog.h @ 704:b81f21f2c4c3

Not quite so many digits
author Chris Cannam
date Wed, 04 Dec 2013 14:00:27 +0000
parents e9fe3923bdf4
children a18e78b9c78b
rev   line source
Chris@303 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@303 2
Chris@303 3 /*
Chris@303 4 Sonic Visualiser
Chris@303 5 An audio file viewer and annotation editor.
Chris@303 6 Centre for Digital Music, Queen Mary, University of London.
Chris@303 7 This file copyright 2007 QMUL.
Chris@303 8
Chris@303 9 This program is free software; you can redistribute it and/or
Chris@303 10 modify it under the terms of the GNU General Public License as
Chris@303 11 published by the Free Software Foundation; either version 2 of the
Chris@303 12 License, or (at your option) any later version. See the file
Chris@303 13 COPYING included with this distribution for more information.
Chris@303 14 */
Chris@303 15
Chris@303 16 #ifndef _IMAGE_DIALOG_H_
Chris@303 17 #define _IMAGE_DIALOG_H_
Chris@303 18
Chris@303 19 #include <QDialog>
Chris@303 20 #include <QString>
Chris@303 21
Chris@303 22 class QLineEdit;
Chris@303 23 class QLabel;
Chris@303 24 class QPushButton;
Chris@318 25 class FileSource;
Chris@303 26
Chris@303 27 class ImageDialog : public QDialog
Chris@303 28 {
Chris@303 29 Q_OBJECT
Chris@303 30
Chris@303 31 public:
Chris@303 32 ImageDialog(QString title,
Chris@303 33 QString image = "",
Chris@303 34 QString label = "",
Chris@303 35 QWidget *parent = 0);
Chris@303 36 virtual ~ImageDialog();
Chris@303 37
Chris@303 38 QString getImage();
Chris@303 39 QPixmap getPixmap();
Chris@303 40 QString getLabel();
Chris@303 41
Chris@303 42 signals:
Chris@303 43 void imageChanged(QString image);
Chris@303 44 void labelChanged(QString label);
Chris@303 45
Chris@303 46 public slots:
Chris@303 47 void setImage(QString image);
Chris@303 48 void setLabel(QString label);
Chris@303 49 void updatePreview();
Chris@303 50
Chris@303 51 protected slots:
Chris@303 52 void browseClicked();
Chris@304 53 void imageEditEdited(const QString &);
Chris@305 54 void imageEditEdited();
Chris@303 55
Chris@303 56 protected:
Chris@303 57 void resizeEvent(QResizeEvent *);
Chris@303 58
Chris@303 59 QLineEdit *m_imageEdit;
Chris@303 60 QLineEdit *m_labelEdit;
Chris@303 61 QLabel *m_imagePreview;
Chris@303 62
Chris@303 63 QString m_loadedImageFile;
Chris@303 64 QPixmap m_loadedImage;
Chris@303 65
Chris@303 66 QPushButton *m_okButton;
Chris@305 67
Chris@318 68 FileSource *m_remoteFile;
Chris@303 69 };
Chris@303 70
Chris@303 71 #endif