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

View file

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

View file

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

View file

@ -41,6 +41,24 @@ public:
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
{
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"
};
const char* VertexShaders[lcMaterialType::Count] =
const char* VertexShaders[static_cast<int>(lcMaterialType::Count)] =
{
":/resources/shaders/unlit_color_vs.glsl", // UnlitColor
":/resources/shaders/unlit_texture_modulate_vs.glsl", // UnlitTextureModulate
@ -113,7 +113,7 @@ void lcContext::CreateShaderPrograms()
":/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_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 void Seek(qint64 Offset, int From) = 0;
virtual size_t GetLength() const = 0;
@ -454,7 +459,12 @@ class lcMemFile : public lcFile
{
public:
lcMemFile();
virtual ~lcMemFile();
~lcMemFile();
lcMemFile(const lcMemFile&) = delete;
lcMemFile(lcMemFile&&) = delete;
lcMemFile& operator=(const lcMemFile&) = delete;
lcMemFile& operator=(lcMemFile&&) = delete;
long GetPosition() const override;
void Seek(qint64 Offset, int From) override;
@ -488,11 +498,16 @@ public:
{
}
virtual ~lcDiskFile()
~lcDiskFile()
{
Close();
}
lcDiskFile(const lcDiskFile&) = delete;
lcDiskFile(lcDiskFile&&) = delete;
lcDiskFile& operator=(const lcDiskFile&) = delete;
lcDiskFile& operator=(lcDiskFile&&) = delete;
void SetFileName(const QString& FileName)
{
mFile.setFileName(FileName);

View file

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

View file

@ -77,6 +77,11 @@ public:
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);
void Unload();
void RemoveTemporaryPieces();

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -71,19 +71,19 @@ public:
lcPiece(const lcPiece& Other);
~lcPiece();
virtual bool IsSelected() const override
bool IsSelected() const override
{
return (mState & LC_PIECE_SELECTION_MASK) != 0;
}
virtual bool IsSelected(quint32 Section) const override
bool IsSelected(quint32 Section) const override
{
Q_UNUSED(Section);
return (mState & LC_PIECE_SELECTION_MASK) != 0;
}
virtual void SetSelected(bool Selected) override
void SetSelected(bool Selected) override
{
if (Selected)
mState |= LC_PIECE_SELECTION_MASK;
@ -91,7 +91,7 @@ public:
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)
{
@ -174,12 +174,12 @@ public:
}
}
virtual bool IsFocused() const override
bool IsFocused() const override
{
return (mState & LC_PIECE_FOCUS_MASK) != 0;
}
virtual bool IsFocused(quint32 Section) const override
bool IsFocused(quint32 Section) const override
{
switch (Section)
{
@ -220,7 +220,7 @@ public:
return false;
}
virtual void SetFocused(quint32 Section, bool Focused) override
void SetFocused(quint32 Section, bool Focused) override
{
switch (Section)
{
@ -303,7 +303,7 @@ public:
}
}
virtual quint32 GetFocusSection() const override
quint32 GetFocusSection() const override
{
if (mState & LC_PIECE_POSITION_FOCUSED)
return LC_PIECE_SECTION_POSITION;
@ -341,9 +341,9 @@ public:
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)
{
@ -400,10 +400,10 @@ public:
return mFileLine;
}
virtual void RayTest(lcObjectRayTest& ObjectRayTest) const override;
virtual void BoxTest(lcObjectBoxTest& ObjectBoxTest) const override;
virtual void DrawInterface(lcContext* Context, const lcScene& Scene) const override;
virtual void RemoveKeyFrames() override;
void RayTest(lcObjectRayTest& ObjectRayTest) const override;
void BoxTest(lcObjectBoxTest& ObjectBoxTest) const override;
void DrawInterface(lcContext* Context, const lcScene& Scene) const override;
void RemoveKeyFrames() override;
void AddMainModelRenderMeshes(lcScene& Scene, bool Highlight, bool Fade) 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:
View(lcModel* Model);
virtual ~View();
~View();
void Clear()
{
@ -85,20 +85,20 @@ public:
static void CreateResources(lcContext* Context);
static void DestroyResources(lcContext* Context);
void OnDraw();
void OnInitialUpdate();
void OnUpdateCursor();
void OnLeftButtonDown();
void OnLeftButtonUp();
void OnLeftButtonDoubleClick();
void OnMiddleButtonDown();
void OnMiddleButtonUp();
void OnRightButtonDown();
void OnRightButtonUp();
void OnBackButtonUp();
void OnForwardButtonUp();
void OnMouseMove();
void OnMouseWheel(float Direction);
void OnDraw() override;
void OnInitialUpdate() override;
void OnUpdateCursor() override;
void OnLeftButtonDown() override;
void OnLeftButtonUp() override;
void OnLeftButtonDoubleClick() override;
void OnMiddleButtonDown() override;
void OnMiddleButtonUp() override;
void OnRightButtonDown() override;
void OnRightButtonUp() override;
void OnBackButtonUp() override;
void OnForwardButtonUp() override;
void OnMouseMove() override;
void OnMouseWheel(float Direction) override;
bool IsTracking() const
{

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -18,7 +18,7 @@ public:
lcPropertiesDialogOptions *options;
public slots:
void accept();
void accept() override;
void colorClicked();
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())
return Acceptable;

View file

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

View file

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

View file

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

View file

@ -9,9 +9,9 @@ float lcParseValueLocalized(const QString& Value);
class lcQTreeWidgetColumnStretcher : public QObject
{
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;
};
@ -24,7 +24,7 @@ public:
{
}
virtual QSize sizeHint() const override
QSize sizeHint() const override
{
QFontMetrics FontMetrics(font());
@ -34,7 +34,7 @@ public:
}
protected:
virtual bool event(QEvent* Event) override
bool event(QEvent* Event) override
{
if (Event->type() == QEvent::ShortcutOverride)
{

View file

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

View file

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