Refactored how preview keeps up with model changes.
This commit is contained in:
+18
-1
@@ -38,8 +38,10 @@ class LabelModel;
|
||||
///
|
||||
/// PageRenderer Widget
|
||||
///
|
||||
class PageRenderer
|
||||
class PageRenderer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
/////////////////////////////////
|
||||
// Life Cycle
|
||||
/////////////////////////////////
|
||||
@@ -52,6 +54,7 @@ public:
|
||||
/////////////////////////////////
|
||||
public:
|
||||
void setModel( const LabelModel* model );
|
||||
const LabelModel* model() const;
|
||||
void setNCopies( int nCopies );
|
||||
void setStartLabel( int startLabel );
|
||||
void setPrintOutlines( bool printOutlinesFlag );
|
||||
@@ -65,6 +68,20 @@ public:
|
||||
void printPage( QPainter* painter, int iPage ) const;
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
// Signals
|
||||
/////////////////////////////////
|
||||
signals:
|
||||
void changed();
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
// Private slots
|
||||
/////////////////////////////////
|
||||
private slots:
|
||||
void onModelChanged();
|
||||
|
||||
|
||||
/////////////////////////////////
|
||||
// Internal Methods
|
||||
/////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user