Refactored how preview keeps up with model changes.

This commit is contained in:
Jim Evins
2016-05-29 22:35:17 -04:00
parent f447aed034
commit cabb71db70
9 changed files with 107 additions and 39 deletions
+18 -1
View File
@@ -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
/////////////////////////////////