Initialize previously uninitialized members.
This commit is contained in:
@@ -41,7 +41,7 @@ namespace glabels
|
|||||||
|
|
||||||
|
|
||||||
ColorButton::ColorButton( QWidget* parent )
|
ColorButton::ColorButton( QWidget* parent )
|
||||||
: QPushButton( parent )
|
: QPushButton( parent ), mIsDefault(0), mDialog(nullptr)
|
||||||
{
|
{
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-2
@@ -84,14 +84,25 @@ namespace glabels
|
|||||||
LabelEditor::LabelEditor( QScrollArea* scrollArea, QWidget* parent )
|
LabelEditor::LabelEditor( QScrollArea* scrollArea, QWidget* parent )
|
||||||
: QWidget(parent), mScrollArea(scrollArea)
|
: QWidget(parent), mScrollArea(scrollArea)
|
||||||
{
|
{
|
||||||
mState = IdleState;
|
|
||||||
|
|
||||||
mModel = nullptr;
|
mModel = nullptr;
|
||||||
mUndoRedoModel = nullptr;
|
mUndoRedoModel = nullptr;
|
||||||
|
|
||||||
|
mZoom = 1;
|
||||||
|
mZoomToFitFlag = false;
|
||||||
|
mScale = 1;
|
||||||
mMarkupVisible = true;
|
mMarkupVisible = true;
|
||||||
mGridVisible = true;
|
mGridVisible = true;
|
||||||
mGridSpacing = 18;
|
mGridSpacing = 18;
|
||||||
|
|
||||||
|
mState = IdleState;
|
||||||
|
|
||||||
|
mSelectRegionVisible = false;
|
||||||
|
mResizeObject = nullptr;
|
||||||
|
mResizeHandle = nullptr;
|
||||||
|
mResizeHonorAspect = false;
|
||||||
|
mCreateObjectType = Box;
|
||||||
|
mCreateObject = nullptr;
|
||||||
|
|
||||||
setMouseTracking( true );
|
setMouseTracking( true );
|
||||||
setFocusPolicy(Qt::StrongFocus);
|
setFocusPolicy(Qt::StrongFocus);
|
||||||
|
|
||||||
|
|||||||
@@ -176,6 +176,9 @@ namespace glabels
|
|||||||
|
|
||||||
QScrollArea* mScrollArea;
|
QScrollArea* mScrollArea;
|
||||||
|
|
||||||
|
model::Model* mModel;
|
||||||
|
UndoRedoModel* mUndoRedoModel;
|
||||||
|
|
||||||
double mZoom;
|
double mZoom;
|
||||||
bool mZoomToFitFlag;
|
bool mZoomToFitFlag;
|
||||||
double mScale;
|
double mScale;
|
||||||
@@ -188,9 +191,6 @@ namespace glabels
|
|||||||
double mGridSpacing;
|
double mGridSpacing;
|
||||||
model::Distance mStepSize;
|
model::Distance mStepSize;
|
||||||
|
|
||||||
model::Model* mModel;
|
|
||||||
UndoRedoModel* mUndoRedoModel;
|
|
||||||
|
|
||||||
State mState;
|
State mState;
|
||||||
|
|
||||||
/* ArrowSelectRegion state */
|
/* ArrowSelectRegion state */
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace glabels
|
|||||||
/// Constructor
|
/// Constructor
|
||||||
///
|
///
|
||||||
MergeView::MergeView( QWidget *parent )
|
MergeView::MergeView( QWidget *parent )
|
||||||
: QWidget(parent), mModel(nullptr), mBlock(false)
|
: QWidget(parent), mModel(nullptr), mUndoRedoModel(nullptr), mBlock(false), mOldFormatComboIndex(0)
|
||||||
{
|
{
|
||||||
setupUi( this );
|
setupUi( this );
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace glabels
|
|||||||
/// Constructor
|
/// Constructor
|
||||||
///
|
///
|
||||||
PropertiesView::PropertiesView( QWidget *parent )
|
PropertiesView::PropertiesView( QWidget *parent )
|
||||||
: QWidget(parent), mModel(nullptr)
|
: QWidget(parent), mModel(nullptr), mUndoRedoModel(nullptr)
|
||||||
{
|
{
|
||||||
setupUi( this );
|
setupUi( this );
|
||||||
|
|
||||||
|
|||||||
+2
-20
@@ -54,7 +54,8 @@ namespace glabels
|
|||||||
///
|
///
|
||||||
/// Default constructor.
|
/// Default constructor.
|
||||||
///
|
///
|
||||||
Model::Model() : mUntitledInstance(0), mModified(true), mTmplate(nullptr), mRotate(false)
|
Model::Model()
|
||||||
|
: mUntitledInstance(0), mModified(true), mTmplate(nullptr), mFrame(nullptr), mRotate(false)
|
||||||
{
|
{
|
||||||
mMerge = new merge::None();
|
mMerge = new merge::None();
|
||||||
}
|
}
|
||||||
@@ -88,7 +89,6 @@ namespace glabels
|
|||||||
mUntitledInstance = savedModel->mUntitledInstance;
|
mUntitledInstance = savedModel->mUntitledInstance;
|
||||||
mModified = savedModel->mModified;
|
mModified = savedModel->mModified;
|
||||||
mFileName = savedModel->mFileName;
|
mFileName = savedModel->mFileName;
|
||||||
mCompressionLevel = savedModel->mCompressionLevel;
|
|
||||||
mTmplate = savedModel->mTmplate;
|
mTmplate = savedModel->mTmplate;
|
||||||
mFrame = savedModel->mFrame;
|
mFrame = savedModel->mFrame;
|
||||||
mRotate = savedModel->mRotate;
|
mRotate = savedModel->mRotate;
|
||||||
@@ -150,24 +150,6 @@ namespace glabels
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Get compression level
|
|
||||||
///
|
|
||||||
int Model::compressionLevel() const
|
|
||||||
{
|
|
||||||
return mCompressionLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
///
|
|
||||||
/// Set compression level
|
|
||||||
///
|
|
||||||
void Model::setCompressionLevel( int compressionLevel )
|
|
||||||
{
|
|
||||||
mCompressionLevel = compressionLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Get template
|
/// Get template
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -93,9 +93,6 @@ namespace glabels
|
|||||||
const QString& fileName() const;
|
const QString& fileName() const;
|
||||||
void setFileName( const QString &fileName );
|
void setFileName( const QString &fileName );
|
||||||
|
|
||||||
int compressionLevel() const;
|
|
||||||
void setCompressionLevel( int compressionLevel );
|
|
||||||
|
|
||||||
const Template* tmplate() const;
|
const Template* tmplate() const;
|
||||||
const Frame* frame() const;
|
const Frame* frame() const;
|
||||||
void setTmplate( const Template* tmplate );
|
void setTmplate( const Template* tmplate );
|
||||||
@@ -225,7 +222,6 @@ namespace glabels
|
|||||||
int mUntitledInstance;
|
int mUntitledInstance;
|
||||||
bool mModified;
|
bool mModified;
|
||||||
QString mFileName;
|
QString mFileName;
|
||||||
int mCompressionLevel;
|
|
||||||
const Template* mTmplate;
|
const Template* mTmplate;
|
||||||
const Frame* mFrame;
|
const Frame* mFrame;
|
||||||
bool mRotate;
|
bool mRotate;
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ namespace glabels
|
|||||||
mBcStyle = bcStyle;
|
mBcStyle = bcStyle;
|
||||||
mBcTextFlag = bcTextFlag;
|
mBcTextFlag = bcTextFlag;
|
||||||
mBcChecksumFlag = bcChecksumFlag;
|
mBcChecksumFlag = bcChecksumFlag;
|
||||||
|
mBcFormatDigits = mBcStyle.preferedN();
|
||||||
mBcData = bcData;
|
mBcData = bcData;
|
||||||
mBcColorNode = bcColorNode;
|
mBcColorNode = bcColorNode;
|
||||||
|
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ namespace glabels
|
|||||||
|
|
||||||
|
|
||||||
PageRenderer::PageRenderer( const Model* model )
|
PageRenderer::PageRenderer( const Model* model )
|
||||||
: mModel(nullptr), mNCopies(0), mStartLabel(0),
|
: mModel(nullptr), mMerge(nullptr), mNCopies(0), mStartLabel(0), mLastLabel(0),
|
||||||
mPrintOutlines(false), mPrintCropMarks(false), mPrintReverse(false),
|
mPrintOutlines(false), mPrintCropMarks(false), mPrintReverse(false),
|
||||||
mIPage(0), mIsMerge(false), mNPages(0)
|
mIPage(0), mIsMerge(false), mNPages(0), mNLabelsPerPage(0)
|
||||||
{
|
{
|
||||||
if ( model )
|
if ( model )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -878,16 +878,16 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>glabels::LabelEditor</name>
|
<name>glabels::LabelEditor</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../glabels/LabelEditor.cpp" line="641"/>
|
<location filename="../glabels/LabelEditor.cpp" line="652"/>
|
||||||
<location filename="../glabels/LabelEditor.cpp" line="941"/>
|
<location filename="../glabels/LabelEditor.cpp" line="952"/>
|
||||||
<location filename="../glabels/LabelEditor.cpp" line="946"/>
|
<location filename="../glabels/LabelEditor.cpp" line="957"/>
|
||||||
<location filename="../glabels/LabelEditor.cpp" line="951"/>
|
<location filename="../glabels/LabelEditor.cpp" line="962"/>
|
||||||
<location filename="../glabels/LabelEditor.cpp" line="956"/>
|
<location filename="../glabels/LabelEditor.cpp" line="967"/>
|
||||||
<source>Move</source>
|
<source>Move</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../glabels/LabelEditor.cpp" line="961"/>
|
<location filename="../glabels/LabelEditor.cpp" line="972"/>
|
||||||
<source>Delete</source>
|
<source>Delete</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
Reference in New Issue
Block a user