Mercurial > hg > svgui
annotate widgets/ImageDialog.h @ 1534:bfd8b22fd67c
Fix #1904 Scrolling colour 3d plot does not always work when in View normalisation mode. We shouldn't imagine we've just invalidated the cache if the truth is that we've only just created the renderer
author | Chris Cannam |
---|---|
date | Wed, 09 Oct 2019 13:45:17 +0100 |
parents | 05d614f6e46d |
children |
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@1407 | 16 #ifndef SV_IMAGE_DIALOG_H |
Chris@1407 | 17 #define SV_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@1406 | 57 void resizeEvent(QResizeEvent *) override; |
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 |