File: previewfiledialog.h

package info (click to toggle)
psi-plugins 1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 4,368 kB
  • sloc: cpp: 42,063; xml: 714; ansic: 84; makefile: 61; sh: 12
file content (21 lines) | stat: -rw-r--r-- 594 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef PREVIEW_FILE_DIALOG_H
#define PREVIEW_FILE_DIALOG_H

#include <QFileDialog>
#include <QLabel>
// based on http://www.qtcentre.org/threads/33593-How-can-i-have-a-QFileDialog-with-a-preview-of-the-picture
class PreviewFileDialog: public QFileDialog {
Q_OBJECT
public:
	explicit PreviewFileDialog(QWidget* parent = 0, const QString & caption = QString(), const QString & directory =
			QString(), const QString & filter = QString(), int previewWidth = 150);

private slots:
	void onCurrentChanged(const QString & path);

protected:
	QLabel* mpPreview;

};

#endif // PREVIEW_FILE_DIALOG_H