annotate widgets/ImageDialog.h @ 303:46faec7aae12

* Phase 1 of an image layer.
author Chris Cannam
date Thu, 04 Oct 2007 16:34:11 +0000
parents
children 4b7e8da8f069
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@303 25
Chris@303 26 class ImageDialog : public QDialog
Chris@303 27 {
Chris@303 28 Q_OBJECT
Chris@303 29
Chris@303 30 public:
Chris@303 31 ImageDialog(QString title,
Chris@303 32 QString image = "",
Chris@303 33 QString label = "",
Chris@303 34 QWidget *parent = 0);
Chris@303 35 virtual ~ImageDialog();
Chris@303 36
Chris@303 37 QString getImage();
Chris@303 38 QPixmap getPixmap();
Chris@303 39 QString getLabel();
Chris@303 40
Chris@303 41 signals:
Chris@303 42 void imageChanged(QString image);
Chris@303 43 void labelChanged(QString label);
Chris@303 44
Chris@303 45 public slots:
Chris@303 46 void setImage(QString image);
Chris@303 47 void setLabel(QString label);
Chris@303 48 void updatePreview();
Chris@303 49
Chris@303 50 protected slots:
Chris@303 51 void browseClicked();
Chris@303 52
Chris@303 53 protected:
Chris@303 54 void resizeEvent(QResizeEvent *);
Chris@303 55
Chris@303 56 QLineEdit *m_imageEdit;
Chris@303 57 QLineEdit *m_labelEdit;
Chris@303 58 QLabel *m_imagePreview;
Chris@303 59
Chris@303 60 QString m_loadedImageFile;
Chris@303 61 QPixmap m_loadedImage;
Chris@303 62
Chris@303 63 QPushButton *m_okButton;
Chris@303 64 };
Chris@303 65
Chris@303 66 #endif