FactDev  0.1
browseimagewidget.h
1 #ifndef BROWSEIMAGEWIDGET_H
2 #define BROWSEIMAGEWIDGET_H
3 
4 #include <QWidget>
5 #include <QFileDialog>
6 #include <QStandardPaths>
7 #include "utils/string.h"
8 #include "gui/widgets/path/chosefilewidget.h"
9 namespace Ui {
10 class BrowseImageWidget;
11 }
12 namespace Gui {
13 namespace Widgets {
18 class BrowseImageWidget : public QWidget
19 {
20  Q_OBJECT
21 
22 public:
27  explicit BrowseImageWidget(QWidget *parent = 0);
29 
38  void setImageScaled(QString path, int width = 128, int height = 128);
39 
44  QPixmap *getImage();
45 
51  void setImage(QPixmap *img);
52 
58  QString getExtension() const;
59 
60 public slots:
61 
66  void browseImagePath();
67 
68 private:
69  Ui::BrowseImageWidget *ui;
70  QPixmap* _img;
71  QString _extension;
72 };
73 
74 }
75 }
76 
77 #endif // BROWSEIMAGEWIDGET_H
void browseImagePath()
BrowseImageWidget::browseImagePath() Open a new window to define the workspace path of the user...
Definition: browseimagewidget.cpp:39
QString getExtension() const
BrowseImageWidgetextension::getExtension Return extension of the image file.
Definition: browseimagewidget.cpp:46
QPixmap * getImage()
BrowseImageWidget::getIcon Return the icon selected.
Definition: browseimagewidget.cpp:27
BrowseImageWidget(QWidget *parent=0)
BrowseImageWidget::BrowseImageWidget Cosntruct a BrowseImageWidget.
Definition: browseimagewidget.cpp:7
The BrowseImageWidget class Widget to add a new BrowseImageWidget.
Definition: browseimagewidget.h:18
void setImageScaled(QString path, int width=128, int height=128)
BrowseImageWidget::getImageScaled Modify the current image to a scaled image from the icon specified ...
Definition: browseimagewidget.cpp:21
void setImage(QPixmap *img)
BrowseImageWidget::setImgage Change the current image by the new img
Definition: browseimagewidget.cpp:32