Modernized code and fixed compiler warnings in Guisan widgets

This commit is contained in:
Dimitris Panokostas 2020-02-07 11:20:25 +01:00
parent 0c56349025
commit 959f0869cb
27 changed files with 432 additions and 500 deletions

View file

@ -176,7 +176,7 @@ namespace gcn
/**
* True if the check box is selected, false otherwise.
*/
bool mSelected;
bool mSelected{};
/**
* Holds the caption of the check box.

View file

@ -268,7 +268,7 @@ namespace gcn
* checking if the list of the drop down was clicked or if the upper part
* of the drop down was clicked on a mouse click
*/
int mFoldedUpHeight;
int mFoldedUpHeight{};
/**
* The scroll area used.

View file

@ -222,7 +222,7 @@ namespace gcn
/**
* The list model to use.
*/
ListModel *mListModel;
ListModel *mListModel{};
/**
* The selected item as an index in the list model.

View file

@ -202,9 +202,9 @@ namespace gcn
*/
unsigned int mAlignment;
unsigned int mStart; //! minimum value of the progressbar
unsigned int mEnd; //! maximum value of the progressbar
unsigned int mValue; //! current value of the progressbar
unsigned int mStart{}; //! minimum value of the progressbar
unsigned int mEnd{}; //! maximum value of the progressbar
unsigned int mValue{}; //! current value of the progressbar
};
}

View file

@ -193,7 +193,7 @@ namespace gcn
/**
* True if the radio button is selected, false otherwise.
*/
bool mSelected;
bool mSelected{};
/**
* Holds the caption of the radio button.

View file

@ -468,8 +468,8 @@ namespace gcn
int mScrollbarWidth;
unsigned int mHPolicy;
unsigned int mVPolicy;
bool mVBarVisible;
bool mHBarVisible;
bool mVBarVisible{};
bool mHBarVisible{};
bool mUpButtonPressed;
bool mDownButtonPressed;
bool mLeftButtonPressed;
@ -480,8 +480,8 @@ namespace gcn
int mRightButtonScrollAmount;
bool mIsVerticalMarkerDragged;
bool mIsHorizontalMarkerDragged;
int mHorizontalMarkerDragOffset;
int mVerticalMarkerDragOffset;
int mHorizontalMarkerDragOffset{};
int mVerticalMarkerDragOffset{};
};
}

View file

@ -255,12 +255,12 @@ namespace gcn
virtual int getMarkerPosition() const;
bool mMouseDrag;
double mValue;
double mStepLength;
int mMarkerLength;
double mValue{};
double mStepLength{};
int mMarkerLength{};
double mScaleStart;
double mScaleEnd;
unsigned int mOrientation;
unsigned int mOrientation{};
};
}

View file

@ -137,7 +137,7 @@ namespace gcn
protected:
Label* mLabel;
TabbedArea* mTabbedArea;
TabbedArea* mTabbedArea{};
std::string mCaption;
bool mHasMouse;
};

View file

@ -203,13 +203,13 @@ namespace gcn
protected:
std::string mCaption;
unsigned int mAlignment;
unsigned int mPadding;
unsigned int mTitleBarHeight;
bool mMovable;
bool mOpaque;
int mDragOffsetX;
int mDragOffsetY;
unsigned int mAlignment{};
unsigned int mPadding{};
unsigned int mTitleBarHeight{};
bool mMovable{};
bool mOpaque{};
int mDragOffsetX{};
int mDragOffsetY{};
bool mIsMoving;
};
}