bunch of stuff. very basic drag/drop now working
This commit is contained in:
23
aspectratiopixmaplabel.hpp
Normal file
23
aspectratiopixmaplabel.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef ASPECTRATIOPIXMAPLABEL_HPP
|
||||
#define ASPECTRATIOPIXMAPLABEL_HPP
|
||||
|
||||
#include <QLabel>
|
||||
#include <QPixmap>
|
||||
#include <QResizeEvent>
|
||||
|
||||
class AspectRatioPixmapLabel : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AspectRatioPixmapLabel(QWidget *parent = 0);
|
||||
virtual int heightForWidth( int width ) const;
|
||||
virtual QSize sizeHint() const;
|
||||
QPixmap scaledPixmap() const;
|
||||
public slots:
|
||||
void setPixmap ( const QPixmap & );
|
||||
void resizeEvent(QResizeEvent *);
|
||||
private:
|
||||
QPixmap pix;
|
||||
};
|
||||
|
||||
#endif // ASPECTRATIOPIXMAPLABEL_HPP
|
||||
Reference in New Issue
Block a user