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