Fixed override and virtual function qualifiers.

This commit is contained in:
Leonardo Zide 2020-03-22 15:44:41 -07:00
parent 90f1336a48
commit 7c9773f228
38 changed files with 197 additions and 165 deletions

View file

@ -40,7 +40,7 @@ class lcCamera : public lcObject
public: public:
lcCamera(bool Simple); lcCamera(bool Simple);
lcCamera(float ex, float ey, float ez, float tx, float ty, float tz); lcCamera(float ex, float ey, float ez, float tx, float ty, float tz);
virtual ~lcCamera(); ~lcCamera();
const char* GetName() const override const char* GetName() const override
{ {
@ -67,12 +67,12 @@ public:
mState &= ~LC_CAMERA_ORTHO; mState &= ~LC_CAMERA_ORTHO;
} }
virtual bool IsSelected() const override bool IsSelected() const override
{ {
return (mState & LC_CAMERA_SELECTION_MASK) != 0; return (mState & LC_CAMERA_SELECTION_MASK) != 0;
} }
virtual bool IsSelected(quint32 Section) const override bool IsSelected(quint32 Section) const override
{ {
switch (Section) switch (Section)
{ {
@ -91,7 +91,7 @@ public:
return false; return false;
} }
virtual void SetSelected(bool Selected) override void SetSelected(bool Selected) override
{ {
if (Selected) if (Selected)
mState |= LC_CAMERA_SELECTION_MASK; mState |= LC_CAMERA_SELECTION_MASK;
@ -99,7 +99,7 @@ public:
mState &= ~(LC_CAMERA_SELECTION_MASK | LC_CAMERA_FOCUS_MASK); mState &= ~(LC_CAMERA_SELECTION_MASK | LC_CAMERA_FOCUS_MASK);
} }
virtual void SetSelected(quint32 Section, bool Selected) override void SetSelected(quint32 Section, bool Selected) override
{ {
switch (Section) switch (Section)
{ {
@ -126,12 +126,12 @@ public:
} }
} }
virtual bool IsFocused() const override bool IsFocused() const override
{ {
return (mState & LC_CAMERA_FOCUS_MASK) != 0; return (mState & LC_CAMERA_FOCUS_MASK) != 0;
} }
virtual bool IsFocused(quint32 Section) const override bool IsFocused(quint32 Section) const override
{ {
switch (Section) switch (Section)
{ {
@ -150,7 +150,7 @@ public:
return false; return false;
} }
virtual void SetFocused(quint32 Section, bool Focus) override void SetFocused(quint32 Section, bool Focus) override
{ {
switch (Section) switch (Section)
{ {
@ -177,7 +177,7 @@ public:
} }
} }
virtual quint32 GetFocusSection() const override quint32 GetFocusSection() const override
{ {
if (mState & LC_CAMERA_POSITION_FOCUSED) if (mState & LC_CAMERA_POSITION_FOCUSED)
return LC_CAMERA_SECTION_POSITION; return LC_CAMERA_SECTION_POSITION;
@ -191,12 +191,12 @@ public:
return ~0U; return ~0U;
} }
virtual quint32 GetAllowedTransforms() const override quint32 GetAllowedTransforms() const override
{ {
return LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z; return LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z;
} }
virtual lcVector3 GetSectionPosition(quint32 Section) const override lcVector3 GetSectionPosition(quint32 Section) const override
{ {
switch (Section) switch (Section)
{ {
@ -259,10 +259,10 @@ public:
} }
public: public:
virtual void RayTest(lcObjectRayTest& ObjectRayTest) const override; void RayTest(lcObjectRayTest& ObjectRayTest) const override;
virtual void BoxTest(lcObjectBoxTest& ObjectBoxTest) const override; void BoxTest(lcObjectBoxTest& ObjectBoxTest) const override;
virtual void DrawInterface(lcContext* Context, const lcScene& Scene) const override; void DrawInterface(lcContext* Context, const lcScene& Scene) const override;
virtual void RemoveKeyFrames() override; void RemoveKeyFrames() override;
void InsertTime(lcStep Start, lcStep Time); void InsertTime(lcStep Start, lcStep Time);
void RemoveTime(lcStep Start, lcStep Time); void RemoveTime(lcStep Start, lcStep Time);

View file

@ -8,10 +8,6 @@ lcGroup::lcGroup()
mGroup = nullptr; mGroup = nullptr;
} }
lcGroup::~lcGroup()
{
}
void lcGroup::FileLoad(lcFile* File) void lcGroup::FileLoad(lcFile* File)
{ {
qint32 GroupIndex; qint32 GroupIndex;

View file

@ -8,7 +8,6 @@ class lcGroup
{ {
public: public:
lcGroup(); lcGroup();
~lcGroup();
lcGroup* GetTopGroup() lcGroup* GetTopGroup()
{ {

View file

@ -41,6 +41,24 @@ public:
return *this; return *this;
} }
lcArray(lcArray<T>&& Array)
{
mData = nullptr;
*this = std::move(Array);
}
lcArray<T>& operator=(lcArray<T>&& Array)
{
delete[] mData;
mData = std::exchange(Array.mData, nullptr);
mLength = std::exchange(Array.mLength, 0);
mAlloc = std::exchange(Array.mAlloc, 0);
mGrow = Array.mGrow;
return *this;
}
const T& operator[](int Index) const const T& operator[](int Index) const
{ {
return mData[Index]; return mData[Index];

View file

@ -102,7 +102,7 @@ void lcContext::CreateShaderPrograms()
" LC_SHADER_PRECISION float Diffuse = min(abs(dot(Normal, LightDirection)) * 0.6 + 0.65, 1.0);\n" " LC_SHADER_PRECISION float Diffuse = min(abs(dot(Normal, LightDirection)) * 0.6 + 0.65, 1.0);\n"
}; };
const char* VertexShaders[lcMaterialType::Count] = const char* VertexShaders[static_cast<int>(lcMaterialType::Count)] =
{ {
":/resources/shaders/unlit_color_vs.glsl", // UnlitColor ":/resources/shaders/unlit_color_vs.glsl", // UnlitColor
":/resources/shaders/unlit_texture_modulate_vs.glsl", // UnlitTextureModulate ":/resources/shaders/unlit_texture_modulate_vs.glsl", // UnlitTextureModulate
@ -113,7 +113,7 @@ void lcContext::CreateShaderPrograms()
":/resources/shaders/fakelit_texture_decal_vs.glsl" // FakeLitTextureDecal ":/resources/shaders/fakelit_texture_decal_vs.glsl" // FakeLitTextureDecal
}; };
const char* FragmentShaders[lcMaterialType::Count] = const char* FragmentShaders[static_cast<int>(lcMaterialType::Count)] =
{ {
":/resources/shaders/unlit_color_ps.glsl", // UnlitColor ":/resources/shaders/unlit_color_ps.glsl", // UnlitColor
":/resources/shaders/unlit_texture_modulate_ps.glsl", // UnlitTextureModulate ":/resources/shaders/unlit_texture_modulate_ps.glsl", // UnlitTextureModulate

View file

@ -18,6 +18,11 @@ public:
{ {
} }
lcFile(const lcFile&) = delete;
lcFile(lcFile&&) = delete;
lcFile& operator=(const lcFile&) = delete;
lcFile& operator=(lcFile&&) = delete;
virtual long GetPosition() const = 0; virtual long GetPosition() const = 0;
virtual void Seek(qint64 Offset, int From) = 0; virtual void Seek(qint64 Offset, int From) = 0;
virtual size_t GetLength() const = 0; virtual size_t GetLength() const = 0;
@ -454,7 +459,12 @@ class lcMemFile : public lcFile
{ {
public: public:
lcMemFile(); lcMemFile();
virtual ~lcMemFile(); ~lcMemFile();
lcMemFile(const lcMemFile&) = delete;
lcMemFile(lcMemFile&&) = delete;
lcMemFile& operator=(const lcMemFile&) = delete;
lcMemFile& operator=(lcMemFile&&) = delete;
long GetPosition() const override; long GetPosition() const override;
void Seek(qint64 Offset, int From) override; void Seek(qint64 Offset, int From) override;
@ -488,11 +498,16 @@ public:
{ {
} }
virtual ~lcDiskFile() ~lcDiskFile()
{ {
Close(); Close();
} }
lcDiskFile(const lcDiskFile&) = delete;
lcDiskFile(lcDiskFile&&) = delete;
lcDiskFile& operator=(const lcDiskFile&) = delete;
lcDiskFile& operator=(lcDiskFile&&) = delete;
void SetFileName(const QString& FileName) void SetFileName(const QString& FileName)
{ {
mFile.setFileName(FileName); mFile.setFileName(FileName);

View file

@ -12,7 +12,7 @@ class lcHttpReply : public QThread
public: public:
lcHttpReply(QObject* Parent, const QString& URL); lcHttpReply(QObject* Parent, const QString& URL);
void run(); void run() override;
bool error() const bool error() const
{ {

View file

@ -77,6 +77,11 @@ public:
lcPiecesLibrary(); lcPiecesLibrary();
~lcPiecesLibrary(); ~lcPiecesLibrary();
lcPiecesLibrary(const lcPiecesLibrary&) = delete;
lcPiecesLibrary(lcPiecesLibrary&&) = delete;
lcPiecesLibrary& operator=(const lcPiecesLibrary&) = delete;
lcPiecesLibrary& operator=(lcPiecesLibrary&&) = delete;
bool Load(const QString& LibraryPath, bool ShowProgress); bool Load(const QString& LibraryPath, bool ShowProgress);
void Unload(); void Unload();
void RemoveTemporaryPieces(); void RemoveTemporaryPieces();

View file

@ -40,8 +40,8 @@ public:
} }
protected: protected:
virtual void mousePressEvent(QMouseEvent* Event) override; void mousePressEvent(QMouseEvent* Event) override;
virtual void mouseReleaseEvent(QMouseEvent* Event) override; void mouseReleaseEvent(QMouseEvent* Event) override;
int mMousePressTab; int mMousePressTab;
}; };
@ -357,10 +357,10 @@ protected slots:
void Print(QPrinter* Printer); void Print(QPrinter* Printer);
protected: protected:
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event) override;
void dragEnterEvent(QDragEnterEvent* Event); void dragEnterEvent(QDragEnterEvent* Event) override;
void dropEvent(QDropEvent* Event); void dropEvent(QDropEvent* Event) override;
QMenu* createPopupMenu(); QMenu* createPopupMenu() override;
void CreateActions(); void CreateActions();
void CreateMenus(); void CreateMenus();

View file

@ -15,7 +15,7 @@ public:
~lcPartPaletteDialog(); ~lcPartPaletteDialog();
protected slots: protected slots:
void accept(); void accept() override;
void on_NewButton_clicked(); void on_NewButton_clicked();
void on_DeleteButton_clicked(); void on_DeleteButton_clicked();
void on_RenameButton_clicked(); void on_RenameButton_clicked();

View file

@ -38,8 +38,8 @@ public:
{ {
} }
virtual void paint(QPainter* Painter, const QStyleOptionViewItem& Option, const QModelIndex& Index) const; void paint(QPainter* Painter, const QStyleOptionViewItem& Option, const QModelIndex& Index) const override;
virtual QSize sizeHint(const QStyleOptionViewItem& Option, const QModelIndex& Index) const; QSize sizeHint(const QStyleOptionViewItem& Option, const QModelIndex& Index) const override;
protected: protected:
lcPartSelectionListModel* mListModel; lcPartSelectionListModel* mListModel;
@ -51,12 +51,12 @@ class lcPartSelectionListModel : public QAbstractListModel
public: public:
lcPartSelectionListModel(QObject* Parent); lcPartSelectionListModel(QObject* Parent);
virtual ~lcPartSelectionListModel(); ~lcPartSelectionListModel();
virtual int rowCount(const QModelIndex& Parent = QModelIndex()) const; int rowCount(const QModelIndex& Parent = QModelIndex()) const override;
virtual QVariant data(const QModelIndex& Index, int Role = Qt::DisplayRole) const; QVariant data(const QModelIndex& Index, int Role = Qt::DisplayRole) const override;
virtual QVariant headerData(int Section, Qt::Orientation Orientation, int Role = Qt::DisplayRole) const; QVariant headerData(int Section, Qt::Orientation Orientation, int Role = Qt::DisplayRole) const override;
virtual Qt::ItemFlags flags(const QModelIndex& Index) const; Qt::ItemFlags flags(const QModelIndex& Index) const override;
PieceInfo* GetPieceInfo(const QModelIndex& Index) const PieceInfo* GetPieceInfo(const QModelIndex& Index) const
{ {
@ -141,7 +141,7 @@ class lcPartSelectionListView : public QListView
public: public:
lcPartSelectionListView(QWidget* Parent, lcPartSelectionWidget* PartSelectionWidget); lcPartSelectionListView(QWidget* Parent, lcPartSelectionWidget* PartSelectionWidget);
virtual void startDrag(Qt::DropActions SupportedActions); void startDrag(Qt::DropActions SupportedActions) override;
void SetCategory(lcPartCategoryType Type, int Index); void SetCategory(lcPartCategoryType Type, int Index);
@ -232,8 +232,8 @@ protected:
void LoadPartPalettes(); void LoadPartPalettes();
void SavePartPalettes(); void SavePartPalettes();
virtual void resizeEvent(QResizeEvent* Event); void resizeEvent(QResizeEvent* Event) override;
virtual bool event(QEvent* Event); bool event(QEvent* Event) override;
QTreeWidget* mCategoriesWidget; QTreeWidget* mCategoriesWidget;
QLineEdit* mFilterWidget; QLineEdit* mFilterWidget;

View file

@ -15,7 +15,7 @@ public:
int mColorIndex; int mColorIndex;
public slots: public slots:
void accept(); void accept() override;
protected: protected:
lcQColorPicker* mColorPicker; lcQColorPicker* mColorPicker;

View file

@ -6,7 +6,7 @@ class lcTimelineWidget : public QTreeWidget
public: public:
lcTimelineWidget(QWidget* Parent); lcTimelineWidget(QWidget* Parent);
virtual ~lcTimelineWidget(); ~lcTimelineWidget();
void Update(bool Clear, bool UpdateItems); void Update(bool Clear, bool UpdateItems);
void UpdateSelection(); void UpdateSelection();
@ -23,8 +23,8 @@ public slots:
void CustomMenuRequested(QPoint Pos); void CustomMenuRequested(QPoint Pos);
protected: protected:
virtual void dropEvent(QDropEvent* Event); void dropEvent(QDropEvent* DropEvent) override;
virtual void mousePressEvent(QMouseEvent* Event); void mousePressEvent(QMouseEvent* MouseEvent) override;
void UpdateModel(); void UpdateModel();
void UpdateCurrentStepItem(); void UpdateCurrentStepItem();

View file

@ -26,7 +26,7 @@ class lcLight : public lcObject
public: public:
lcLight(float px, float py, float pz); lcLight(float px, float py, float pz);
lcLight(float px, float py, float pz, float tx, float ty, float tz); lcLight(float px, float py, float pz, float tx, float ty, float tz);
virtual ~lcLight(); ~lcLight();
bool IsPointLight() const bool IsPointLight() const
{ {
@ -43,12 +43,12 @@ public:
return (mState & LC_LIGHT_DIRECTIONAL) != 0; return (mState & LC_LIGHT_DIRECTIONAL) != 0;
} }
virtual bool IsSelected() const override bool IsSelected() const override
{ {
return (mState & LC_LIGHT_SELECTION_MASK) != 0; return (mState & LC_LIGHT_SELECTION_MASK) != 0;
} }
virtual bool IsSelected(quint32 Section) const override bool IsSelected(quint32 Section) const override
{ {
switch (Section) switch (Section)
{ {
@ -63,7 +63,7 @@ public:
return false; return false;
} }
virtual void SetSelected(bool Selected) override void SetSelected(bool Selected) override
{ {
if (Selected) if (Selected)
{ {
@ -76,7 +76,7 @@ public:
mState &= ~(LC_LIGHT_SELECTION_MASK | LC_LIGHT_FOCUS_MASK); mState &= ~(LC_LIGHT_SELECTION_MASK | LC_LIGHT_FOCUS_MASK);
} }
virtual void SetSelected(quint32 Section, bool Selected) override void SetSelected(quint32 Section, bool Selected) override
{ {
switch (Section) switch (Section)
{ {
@ -99,12 +99,12 @@ public:
} }
} }
virtual bool IsFocused() const override bool IsFocused() const override
{ {
return (mState & LC_LIGHT_FOCUS_MASK) != 0; return (mState & LC_LIGHT_FOCUS_MASK) != 0;
} }
virtual bool IsFocused(quint32 Section) const override bool IsFocused(quint32 Section) const override
{ {
switch (Section) switch (Section)
{ {
@ -119,7 +119,7 @@ public:
return false; return false;
} }
virtual void SetFocused(quint32 Section, bool Focused) override void SetFocused(quint32 Section, bool Focused) override
{ {
switch (Section) switch (Section)
{ {
@ -142,7 +142,7 @@ public:
} }
} }
virtual quint32 GetFocusSection() const override quint32 GetFocusSection() const override
{ {
if (mState & LC_LIGHT_POSITION_FOCUSED) if (mState & LC_LIGHT_POSITION_FOCUSED)
return LC_LIGHT_SECTION_POSITION; return LC_LIGHT_SECTION_POSITION;
@ -153,12 +153,12 @@ public:
return ~0U; return ~0U;
} }
virtual quint32 GetAllowedTransforms() const override quint32 GetAllowedTransforms() const override
{ {
return LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z; return LC_OBJECT_TRANSFORM_MOVE_X | LC_OBJECT_TRANSFORM_MOVE_Y | LC_OBJECT_TRANSFORM_MOVE_Z;
} }
virtual lcVector3 GetSectionPosition(quint32 Section) const override lcVector3 GetSectionPosition(quint32 Section) const override
{ {
switch (Section) switch (Section)
{ {
@ -175,10 +175,10 @@ public:
void SaveLDraw(QTextStream& Stream) const; void SaveLDraw(QTextStream& Stream) const;
public: public:
virtual void RayTest(lcObjectRayTest& ObjectRayTest) const override; void RayTest(lcObjectRayTest& ObjectRayTest) const override;
virtual void BoxTest(lcObjectBoxTest& ObjectBoxTest) const override; void BoxTest(lcObjectBoxTest& ObjectBoxTest) const override;
virtual void DrawInterface(lcContext* Context, const lcScene& Scene) const override; void DrawInterface(lcContext* Context, const lcScene& Scene) const override;
virtual void RemoveKeyFrames() override; void RemoveKeyFrames() override;
void InsertTime(lcStep Start, lcStep Time); void InsertTime(lcStep Start, lcStep Time);
void RemoveTime(lcStep Start, lcStep Time); void RemoveTime(lcStep Start, lcStep Time);

View file

@ -63,14 +63,14 @@ public:
void AddTemplatesJson(const QByteArray& TemplateData); void AddTemplatesJson(const QByteArray& TemplateData);
QByteArray GetTemplatesJson() const; QByteArray GetTemplatesJson() const;
void OnDraw(); void OnDraw() override;
void OnLeftButtonDown(); void OnLeftButtonDown() override;
void OnLeftButtonUp(); void OnLeftButtonUp() override;
void OnLeftButtonDoubleClick(); void OnLeftButtonDoubleClick() override;
void OnRightButtonDown(); void OnRightButtonDown() override;
void OnRightButtonUp(); void OnRightButtonUp() override;
void OnMouseMove(); void OnMouseMove() override;
void OnInitialUpdate(); void OnInitialUpdate() override;
void Calculate(); void Calculate();
int GetSelectionIndex(int Type) const; int GetSelectionIndex(int Type) const;

View file

@ -71,19 +71,19 @@ public:
lcPiece(const lcPiece& Other); lcPiece(const lcPiece& Other);
~lcPiece(); ~lcPiece();
virtual bool IsSelected() const override bool IsSelected() const override
{ {
return (mState & LC_PIECE_SELECTION_MASK) != 0; return (mState & LC_PIECE_SELECTION_MASK) != 0;
} }
virtual bool IsSelected(quint32 Section) const override bool IsSelected(quint32 Section) const override
{ {
Q_UNUSED(Section); Q_UNUSED(Section);
return (mState & LC_PIECE_SELECTION_MASK) != 0; return (mState & LC_PIECE_SELECTION_MASK) != 0;
} }
virtual void SetSelected(bool Selected) override void SetSelected(bool Selected) override
{ {
if (Selected) if (Selected)
mState |= LC_PIECE_SELECTION_MASK; mState |= LC_PIECE_SELECTION_MASK;
@ -91,7 +91,7 @@ public:
mState &= ~(LC_PIECE_SELECTION_MASK | LC_PIECE_FOCUS_MASK); mState &= ~(LC_PIECE_SELECTION_MASK | LC_PIECE_FOCUS_MASK);
} }
virtual void SetSelected(quint32 Section, bool Selected) override void SetSelected(quint32 Section, bool Selected) override
{ {
switch (Section) switch (Section)
{ {
@ -174,12 +174,12 @@ public:
} }
} }
virtual bool IsFocused() const override bool IsFocused() const override
{ {
return (mState & LC_PIECE_FOCUS_MASK) != 0; return (mState & LC_PIECE_FOCUS_MASK) != 0;
} }
virtual bool IsFocused(quint32 Section) const override bool IsFocused(quint32 Section) const override
{ {
switch (Section) switch (Section)
{ {
@ -220,7 +220,7 @@ public:
return false; return false;
} }
virtual void SetFocused(quint32 Section, bool Focused) override void SetFocused(quint32 Section, bool Focused) override
{ {
switch (Section) switch (Section)
{ {
@ -303,7 +303,7 @@ public:
} }
} }
virtual quint32 GetFocusSection() const override quint32 GetFocusSection() const override
{ {
if (mState & LC_PIECE_POSITION_FOCUSED) if (mState & LC_PIECE_POSITION_FOCUSED)
return LC_PIECE_SECTION_POSITION; return LC_PIECE_SECTION_POSITION;
@ -341,9 +341,9 @@ public:
return LC_PIECE_SECTION_INVALID; return LC_PIECE_SECTION_INVALID;
} }
virtual quint32 GetAllowedTransforms() const override; quint32 GetAllowedTransforms() const override;
virtual lcVector3 GetSectionPosition(quint32 Section) const override lcVector3 GetSectionPosition(quint32 Section) const override
{ {
switch (Section) switch (Section)
{ {
@ -400,10 +400,10 @@ public:
return mFileLine; return mFileLine;
} }
virtual void RayTest(lcObjectRayTest& ObjectRayTest) const override; void RayTest(lcObjectRayTest& ObjectRayTest) const override;
virtual void BoxTest(lcObjectBoxTest& ObjectBoxTest) const override; void BoxTest(lcObjectBoxTest& ObjectBoxTest) const override;
virtual void DrawInterface(lcContext* Context, const lcScene& Scene) const override; void DrawInterface(lcContext* Context, const lcScene& Scene) const override;
virtual void RemoveKeyFrames() override; void RemoveKeyFrames() override;
void AddMainModelRenderMeshes(lcScene& Scene, bool Highlight, bool Fade) const; void AddMainModelRenderMeshes(lcScene& Scene, bool Highlight, bool Fade) const;
void AddSubModelRenderMeshes(lcScene& Scene, const lcMatrix44& WorldMatrix, int DefaultColorIndex, lcRenderMeshState RenderMeshState, bool ParentActive) const; void AddSubModelRenderMeshes(lcScene& Scene, const lcMatrix44& WorldMatrix, int DefaultColorIndex, lcRenderMeshState RenderMeshState, bool ParentActive) const;

View file

@ -60,7 +60,7 @@ class View : public lcGLWidget
{ {
public: public:
View(lcModel* Model); View(lcModel* Model);
virtual ~View(); ~View();
void Clear() void Clear()
{ {
@ -85,20 +85,20 @@ public:
static void CreateResources(lcContext* Context); static void CreateResources(lcContext* Context);
static void DestroyResources(lcContext* Context); static void DestroyResources(lcContext* Context);
void OnDraw(); void OnDraw() override;
void OnInitialUpdate(); void OnInitialUpdate() override;
void OnUpdateCursor(); void OnUpdateCursor() override;
void OnLeftButtonDown(); void OnLeftButtonDown() override;
void OnLeftButtonUp(); void OnLeftButtonUp() override;
void OnLeftButtonDoubleClick(); void OnLeftButtonDoubleClick() override;
void OnMiddleButtonDown(); void OnMiddleButtonDown() override;
void OnMiddleButtonUp(); void OnMiddleButtonUp() override;
void OnRightButtonDown(); void OnRightButtonDown() override;
void OnRightButtonUp(); void OnRightButtonUp() override;
void OnBackButtonUp(); void OnBackButtonUp() override;
void OnForwardButtonUp(); void OnForwardButtonUp() override;
void OnMouseMove(); void OnMouseMove() override;
void OnMouseWheel(float Direction); void OnMouseWheel(float Direction) override;
bool IsTracking() const bool IsTracking() const
{ {

View file

@ -20,7 +20,7 @@ public:
lcVector3 mRotations[3]; lcVector3 mRotations[3];
public slots: public slots:
void accept(); void accept() override;
private: private:
Ui::lcQArrayDialog *ui; Ui::lcQArrayDialog *ui;

View file

@ -18,7 +18,7 @@ public:
lcLibraryCategory *options; lcLibraryCategory *options;
public slots: public slots:
void accept(); void accept() override;
private: private:
Ui::lcQCategoryDialog *ui; Ui::lcQCategoryDialog *ui;

View file

@ -20,12 +20,12 @@ signals:
void colorSelected(int colorIndex); void colorSelected(int colorIndex);
protected: protected:
virtual bool event(QEvent* Event) override; bool event(QEvent* Event) override;
virtual void paintEvent(QPaintEvent* PaintEvent) override; void paintEvent(QPaintEvent* PaintEvent) override;
virtual void resizeEvent(QResizeEvent* ResizeEvent) override; void resizeEvent(QResizeEvent* ResizeEvent) override;
virtual void mousePressEvent(QMouseEvent* MouseEvent) override; void mousePressEvent(QMouseEvent* MouseEvent) override;
virtual void mouseMoveEvent(QMouseEvent* MouseEvent) override; void mouseMoveEvent(QMouseEvent* MouseEvent) override;
virtual void keyPressEvent(QKeyEvent* KeyEvent) override; void keyPressEvent(QKeyEvent* KeyEvent) override;
void SelectCell(int CellIdx); void SelectCell(int CellIdx);

View file

@ -8,7 +8,7 @@ class lcQColorPickerPopup : public QFrame
Q_OBJECT Q_OBJECT
public: public:
lcQColorPickerPopup(QWidget *parent = 0, int colorIndex = 0); lcQColorPickerPopup(QWidget *parent = nullptr, int colorIndex = 0);
~lcQColorPickerPopup(); ~lcQColorPickerPopup();
void exec(); void exec();
@ -23,9 +23,9 @@ public slots:
void colorSelected(int colorIndex); void colorSelected(int colorIndex);
protected: protected:
void showEvent(QShowEvent *e); void showEvent(QShowEvent* ShowEvent) override;
void hideEvent(QHideEvent *e); void hideEvent(QHideEvent* HideEvent) override;
void mouseReleaseEvent(QMouseEvent *e); void mouseReleaseEvent(QMouseEvent* MouseEvent) override;
private: private:
QEventLoop *eventLoop; QEventLoop *eventLoop;

View file

@ -26,8 +26,8 @@ public:
}; };
public slots: public slots:
void accept(); void accept() override;
void reject(); void reject() override;
void on_newGroup_clicked(); void on_newGroup_clicked();
void onItemClicked(QTreeWidgetItem* Item, int Column); void onItemClicked(QTreeWidgetItem* Item, int Column);
void onItemDoubleClicked(QTreeWidgetItem* Item, int Column); void onItemDoubleClicked(QTreeWidgetItem* Item, int Column);
@ -38,7 +38,7 @@ private:
void UpdateParents(QTreeWidgetItem* ParentItem, lcGroup* ParentGroup); void UpdateParents(QTreeWidgetItem* ParentItem, lcGroup* ParentGroup);
void AddChildren(QTreeWidgetItem* ParentItem, lcGroup* ParentGroup); void AddChildren(QTreeWidgetItem* ParentItem, lcGroup* ParentGroup);
void timerEvent(QTimerEvent* Event); void timerEvent(QTimerEvent* Event) override;
lcModel* mModel; lcModel* mModel;
QTreeWidgetItem* mLastItemClicked; QTreeWidgetItem* mLastItemClicked;

View file

@ -18,7 +18,7 @@ public:
lcSearchOptions* mSearchOptions; lcSearchOptions* mSearchOptions;
public slots: public slots:
void accept(); void accept() override;
private: private:
Ui::lcQFindDialog *ui; Ui::lcQFindDialog *ui;

View file

@ -6,10 +6,10 @@ class lcGLWidget;
class lcQGLWidget : public QGLWidget class lcQGLWidget : public QGLWidget
{ {
public: public:
lcQGLWidget(QWidget *parent, lcGLWidget *owner, bool view); lcQGLWidget(QWidget* Parent, lcGLWidget* Owner, bool IsView);
~lcQGLWidget(); ~lcQGLWidget();
QSize sizeHint() const; QSize sizeHint() const override;
lcGLWidget *widget; lcGLWidget *widget;
QSize preferredSize; QSize preferredSize;
@ -27,20 +27,20 @@ public:
QTimer mUpdateTimer; QTimer mUpdateTimer;
protected: protected:
void initializeGL(); void initializeGL() override;
void resizeGL(int x, int h); void resizeGL(int Width, int Height) override;
void paintGL(); void paintGL() override;
void keyPressEvent(QKeyEvent *event); void keyPressEvent(QKeyEvent* KeyEvent) override;
void keyReleaseEvent(QKeyEvent *event); void keyReleaseEvent(QKeyEvent* KeyEvent) override;
void mousePressEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent* MouseEvent) override;
void mouseReleaseEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent* MouseEvent) override;
void mouseDoubleClickEvent(QMouseEvent *event); void mouseDoubleClickEvent(QMouseEvent* MouseEvent) override;
void mouseMoveEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent* MouseEvent) override;
void wheelEvent(QWheelEvent *event); void wheelEvent(QWheelEvent* WheelEvent) override;
void dragEnterEvent(QDragEnterEvent *event); void dragEnterEvent(QDragEnterEvent* DragEnterEvent) override;
void dragLeaveEvent(QDragLeaveEvent *event); void dragLeaveEvent(QDragLeaveEvent* DragLeaveEvent) override;
void dragMoveEvent(QDragMoveEvent *event); void dragMoveEvent(QDragMoveEvent* DragMoveEvent) override;
void dropEvent(QDropEvent *event); void dropEvent(QDropEvent* DropEvent) override;
int mWheelAccumulator; int mWheelAccumulator;
}; };

View file

@ -11,15 +11,14 @@ class lcQGroupDialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit lcQGroupDialog(QWidget *parent, const QString& Name); explicit lcQGroupDialog(QWidget* Parent, const QString& Name);
~lcQGroupDialog(); ~lcQGroupDialog();
QString mName; QString mName;
public slots: public slots:
void accept(); void accept() override;
private: private:
Ui::lcQGroupDialog *ui; Ui::lcQGroupDialog *ui;
}; };

View file

@ -16,7 +16,7 @@ public:
~lcQHTMLDialog(); ~lcQHTMLDialog();
public slots: public slots:
void accept(); void accept() override;
void on_outputFolderBrowse_clicked(); void on_outputFolderBrowse_clicked();
private: private:

View file

@ -21,7 +21,7 @@ public:
int mEnd; int mEnd;
public slots: public slots:
void accept(); void accept() override;
void on_fileNameBrowse_clicked(); void on_fileNameBrowse_clicked();
private: private:

View file

@ -19,7 +19,7 @@ public:
QList<QPair<QString, lcModel*>>& mModels; QList<QPair<QString, lcModel*>>& mModels;
public slots: public slots:
void accept(); void accept() override;
void on_NewModel_clicked(); void on_NewModel_clicked();
void on_DeleteModel_clicked(); void on_DeleteModel_clicked();
void on_RenameModel_clicked(); void on_RenameModel_clicked();

View file

@ -22,10 +22,10 @@ public:
CategoryRole = Qt::UserRole CategoryRole = Qt::UserRole
}; };
bool eventFilter(QObject *object, QEvent *event); bool eventFilter(QObject* Object, QEvent* Event) override;
public slots: public slots:
void accept(); void accept() override;
void on_partsLibraryBrowse_clicked(); void on_partsLibraryBrowse_clicked();
void on_partsArchiveBrowse_clicked(); void on_partsArchiveBrowse_clicked();
void on_ColorConfigBrowseButton_clicked(); void on_ColorConfigBrowseButton_clicked();

View file

@ -16,7 +16,7 @@ public:
mLast = false; mLast = false;
} }
virtual bool operator<(const QTableWidgetItem& Other) const override bool operator<(const QTableWidgetItem& Other) const override
{ {
if (mLast) if (mLast)
return false; return false;

View file

@ -18,7 +18,7 @@ public:
lcPropertiesDialogOptions *options; lcPropertiesDialogOptions *options;
public slots: public slots:
void accept(); void accept() override;
void colorClicked(); void colorClicked();
void on_imageNameButton_clicked(); void on_imageNameButton_clicked();

View file

@ -406,7 +406,7 @@ public:
{ {
} }
QValidator::State validate(QString& Input, int& Pos) const QValidator::State validate(QString& Input, int& Pos) const override
{ {
if (mAllowEmpty && Input.isEmpty()) if (mAllowEmpty && Input.isEmpty())
return Acceptable; return Acceptable;

View file

@ -21,7 +21,7 @@ class lcQPropertiesTree : public QTreeWidget
public: public:
lcQPropertiesTree(QWidget *parent = 0); lcQPropertiesTree(QWidget *parent = 0);
QSize sizeHint() const; QSize sizeHint() const override;
QTreeWidgetItem *indexToItem(const QModelIndex &index) const QTreeWidgetItem *indexToItem(const QModelIndex &index) const
{ {
@ -57,9 +57,9 @@ protected slots:
void slotColorButtonClicked(); void slotColorButtonClicked();
protected: protected:
void keyPressEvent(QKeyEvent *event); void keyPressEvent(QKeyEvent *event) override;
void mousePressEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent *event) override;
void drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; void drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void updateColorEditor(QPushButton *editor, int value) const; void updateColorEditor(QPushButton *editor, int value) const;
QTreeWidgetItem *addProperty(QTreeWidgetItem *parent, const QString& label, PropertyType propertyType); QTreeWidgetItem *addProperty(QTreeWidgetItem *parent, const QString& label, PropertyType propertyType);
@ -128,13 +128,13 @@ public:
m_treeWidget = treeWidget; m_treeWidget = treeWidget;
} }
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const; QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const; void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setModelData(QWidget *, QAbstractItemModel *, const QModelIndex &) const {} void setModelData(QWidget *, QAbstractItemModel *, const QModelIndex &) const override {}
void setEditorData(QWidget *, const QModelIndex &) const {} void setEditorData(QWidget *, const QModelIndex &) const override {}
bool eventFilter(QObject *object, QEvent *event); bool eventFilter(QObject *object, QEvent *event) override;
QTreeWidgetItem *editedItem() const QTreeWidgetItem *editedItem() const
{ {
@ -147,8 +147,8 @@ public:
} }
protected: protected:
void drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QPixmap &pixmap) const; void drawDecoration(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QPixmap &pixmap) const override;
void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const; void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const override;
private slots: private slots:
void slotEditorDestroyed(QObject *object); void slotEditorDestroyed(QObject *object);

View file

@ -23,7 +23,7 @@ public:
}; };
public slots: public slots:
void accept(); void accept() override;
void on_selectAll_clicked(); void on_selectAll_clicked();
void on_selectNone_clicked(); void on_selectNone_clicked();
void on_selectInvert_clicked(); void on_selectInvert_clicked();

View file

@ -23,8 +23,8 @@ public:
public slots: public slots:
void DownloadFinished(lcHttpReply* Reply); void DownloadFinished(lcHttpReply* Reply);
void accept(); void accept() override;
void reject(); void reject() override;
void finished(int result); void finished(int result);
private: private:

View file

@ -9,9 +9,9 @@ float lcParseValueLocalized(const QString& Value);
class lcQTreeWidgetColumnStretcher : public QObject class lcQTreeWidgetColumnStretcher : public QObject
{ {
public: public:
lcQTreeWidgetColumnStretcher(QTreeWidget *treeWidget, int columnToStretch); lcQTreeWidgetColumnStretcher(QTreeWidget* TreeWidget, int ColumnToStretch);
virtual bool eventFilter(QObject *obj, QEvent *ev); bool eventFilter(QObject* Object, QEvent* Event) override;
const int m_columnToStretch; const int m_columnToStretch;
}; };
@ -24,7 +24,7 @@ public:
{ {
} }
virtual QSize sizeHint() const override QSize sizeHint() const override
{ {
QFontMetrics FontMetrics(font()); QFontMetrics FontMetrics(font());
@ -34,7 +34,7 @@ public:
} }
protected: protected:
virtual bool event(QEvent* Event) override bool event(QEvent* Event) override
{ {
if (Event->type() == QEvent::ShortcutOverride) if (Event->type() == QEvent::ShortcutOverride)
{ {

View file

@ -24,8 +24,8 @@ public:
} }
protected: protected:
virtual void resizeEvent(QResizeEvent* Event) override; void resizeEvent(QResizeEvent* Event) override;
virtual void paintEvent(QPaintEvent* PaintEvent) override; void paintEvent(QPaintEvent* PaintEvent) override;
QImage mImage; QImage mImage;
QImage mScaledImage; QImage mScaledImage;
@ -40,7 +40,7 @@ public:
~lcRenderDialog(); ~lcRenderDialog();
public slots: public slots:
void reject(); void reject() override;
void on_RenderButton_clicked(); void on_RenderButton_clicked();
void on_OutputBrowseButton_clicked(); void on_OutputBrowseButton_clicked();
void Update(); void Update();

View file

@ -25,7 +25,7 @@ public:
return mInventory; return mInventory;
} }
virtual bool eventFilter(QObject* Object, QEvent* Event) override; bool eventFilter(QObject* Object, QEvent* Event) override;
public slots: public slots:
void DownloadFinished(lcHttpReply* Reply); void DownloadFinished(lcHttpReply* Reply);