Better scroll to fit implementation.
This commit is contained in:
+6
-3
@@ -22,6 +22,7 @@
|
||||
#define glabels_View_h
|
||||
|
||||
#include <QWidget>
|
||||
#include <QScrollArea>
|
||||
#include <QPainter>
|
||||
|
||||
#include "LabelRegion.h"
|
||||
@@ -46,7 +47,7 @@ namespace glabels
|
||||
// Lifecycle
|
||||
/////////////////////////////////////
|
||||
public:
|
||||
View( QWidget *parent = 0 );
|
||||
View( QScrollArea* scrollArea, QWidget* parent = 0 );
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
@@ -142,8 +143,8 @@ namespace glabels
|
||||
// Private slots
|
||||
/////////////////////////////////////
|
||||
private:
|
||||
void onLabelChanged();
|
||||
void onLabelSizeChanged();
|
||||
void onModelChanged();
|
||||
void onModelSizeChanged();
|
||||
|
||||
|
||||
/////////////////////////////////////
|
||||
@@ -167,6 +168,8 @@ namespace glabels
|
||||
Barcode
|
||||
};
|
||||
|
||||
QScrollArea* mScrollArea;
|
||||
|
||||
double mZoom;
|
||||
bool mZoomToFitFlag;
|
||||
double mScale;
|
||||
|
||||
Reference in New Issue
Block a user