Get rid of "protected" specifier and make visibility of the following members "private".

This commit is contained in:
Roman Telezhynskyi 2024-07-10 11:52:59 +03:00
parent daa5dada4b
commit 691160943b
12 changed files with 91 additions and 98 deletions

View file

@ -64,13 +64,6 @@ public:
public slots:
void ToolBarStyles();
protected:
void closeEvent(QCloseEvent *event) override;
void changeEvent(QEvent *event) override;
auto eventFilter(QObject *object, QEvent *event) -> bool override;
void ExportToCSVData(const QString &fileName, bool withHeader, int mib, const QChar &separator) override;
auto RecentFileList() const -> QStringList override;
private slots:
void FileNew();
void OpenKnownMeasurements();
@ -191,6 +184,12 @@ private:
auto CSVColumnHeader(int column) const -> QString;
auto ReadCSV(const QxtCsvModel &csv, const QVector<int> &map, bool withHeader) -> QVector<VKnownMeasurement>;
void ImportKnownMeasurements(const QxtCsvModel &csv, const QVector<int> &map, bool withHeader);
void closeEvent(QCloseEvent *event) override;
void changeEvent(QEvent *event) override;
auto eventFilter(QObject *object, QEvent *event) -> bool override;
void ExportToCSVData(const QString &fileName, bool withHeader, int mib, const QChar &separator) override;
auto RecentFileList() const -> QStringList override;
};
#endif // TKMMAINWINDOW_H

View file

@ -76,13 +76,6 @@ public:
public slots:
void ToolBarStyles();
protected:
void closeEvent(QCloseEvent *event) override;
void changeEvent(QEvent *event) override;
auto eventFilter(QObject *object, QEvent *event) -> bool override;
void ExportToCSVData(const QString &fileName, bool withHeader, int mib, const QChar &separator) override;
auto RecentFileList() const -> QStringList override;
private slots:
void FileNew();
void OpenIndividual();
@ -312,6 +305,12 @@ private:
auto CSVColumnHeader(int column) const -> QString;
void ExportRowToCSV(QxtCsvModel &csv, int row, const QSharedPointer<VMeasurement> &meash,
const VKnownMeasurements &knownDB) const;
void closeEvent(QCloseEvent *event) override;
void changeEvent(QEvent *event) override;
auto eventFilter(QObject *object, QEvent *event) -> bool override;
void ExportToCSVData(const QString &fileName, bool withHeader, int mib, const QChar &separator) override;
auto RecentFileList() const -> QStringList override;
};
#endif // TMAINWINDOW_H

View file

@ -62,10 +62,6 @@ public slots:
bool CheckForUpdatesSilent(); // NOLINT(modernize-use-trailing-return-type)
bool CheckForUpdatesNotSilent(); // NOLINT(modernize-use-trailing-return-type)
protected:
friend class FvUpdateWindow; // Uses GetProposedUpdate() and others
auto GetProposedUpdate() -> QPointer<FvAvailableUpdate>;
protected slots:
// Update window button slots
void InstallUpdate();
@ -83,8 +79,8 @@ private:
// Singleton business
//
Q_DISABLE_COPY_MOVE(FvUpdater) // NOLINT
FvUpdater(); // Hide main constructor
virtual ~FvUpdater(); // Hide main destructor
FvUpdater(); // Hide main constructor
virtual ~FvUpdater(); // Hide main destructor
static QPointer<FvUpdater> m_Instance; // Singleton instance
@ -101,19 +97,19 @@ private:
//
// HTTP feed fetcher infrastructure
//
QUrl m_feedURL; // Feed URL that will be fetched
QNetworkAccessManager m_qnam;
QUrl m_feedURL; // Feed URL that will be fetched
QNetworkAccessManager m_qnam;
QPointer<QNetworkReply> m_reply;
bool m_httpRequestAborted;
bool m_dropOnFinnish;
bool m_httpRequestAborted;
bool m_dropOnFinnish;
QXmlStreamReader m_xml; // XML data collector and parser
QXmlStreamReader m_xml; // XML data collector and parser
void showUpdaterWindowUpdatedWithCurrentUpdateProposal(); // Show updater window
void hideUpdaterWindow(); // Hide + destroy m_updaterWindow
void showUpdaterWindowUpdatedWithCurrentUpdateProposal(); // Show updater window
void hideUpdaterWindow(); // Hide + destroy m_updaterWindow
void startDownloadFeed(const QUrl &url); // Start downloading feed
void cancelDownloadFeed(); // Stop downloading the current feed
void cancelDownloadFeed(); // Stop downloading the current feed
// Dialogs (notifications)
// Show an error message
@ -128,6 +124,9 @@ private:
static auto VersionIsIgnored(const QString &version) -> bool;
static void IgnoreVersion(const QString &version);
static auto CurrentlyRunningOnPlatform(const QString &platform) -> bool;
friend class FvUpdateWindow; // Uses GetProposedUpdate() and others
auto GetProposedUpdate() -> QPointer<FvAvailableUpdate>;
};
#endif // FVUPDATER_H

View file

@ -55,7 +55,7 @@ public:
auto BadId() const -> quint32;
auto BadKey() const -> QString;
protected:
private:
/** @brief id id */
quint32 id;

View file

@ -29,7 +29,6 @@
#ifndef VEXCEPTIONCONVERSIONERROR_H
#define VEXCEPTIONCONVERSIONERROR_H
#include <QString>
#include "../ifcdef.h"
@ -41,22 +40,24 @@
class VExceptionConversionError final : public VException
{
public:
VExceptionConversionError(const QString &error, const QString &str) V_NOEXCEPT_EXPR (true);
VExceptionConversionError(const VExceptionConversionError &e) V_NOEXCEPT_EXPR (true);
VExceptionConversionError(const QString &error, const QString &str) V_NOEXCEPT_EXPR(true);
VExceptionConversionError(const VExceptionConversionError &e) V_NOEXCEPT_EXPR(true);
auto operator=(const VExceptionConversionError &e) V_NOEXCEPT_EXPR(true) -> VExceptionConversionError &;
virtual ~VExceptionConversionError() V_NOEXCEPT_EXPR (true) = default;
virtual ~VExceptionConversionError() V_NOEXCEPT_EXPR(true) = default;
Q_NORETURN virtual void raise() const override { throw *this; }
Q_REQUIRED_RESULT virtual auto clone() const -> VExceptionConversionError * override
{ return new VExceptionConversionError(*this); }
{
return new VExceptionConversionError(*this);
}
virtual auto ErrorMessage() const -> QString override;
auto String() const -> QString;
protected:
private:
/** @brief str string, where happend error */
QString str;
QString str;
};
//---------------------------------------------------------------------------------------------------------------------

View file

@ -29,7 +29,6 @@
#ifndef VEXCEPTIONEMPTYPARAMETER_H
#define VEXCEPTIONEMPTYPARAMETER_H
#include <QString>
#include <QtGlobal>
@ -44,16 +43,18 @@ class QDomElement;
class VExceptionEmptyParameter final : public VException
{
public:
VExceptionEmptyParameter(const QString &what, const QString &name,
const QDomElement &domElement) V_NOEXCEPT_EXPR (true);
VExceptionEmptyParameter(const VExceptionEmptyParameter &e) V_NOEXCEPT_EXPR (true);
VExceptionEmptyParameter(const QString &what, const QString &name, const QDomElement &domElement)
V_NOEXCEPT_EXPR(true);
VExceptionEmptyParameter(const VExceptionEmptyParameter &e) V_NOEXCEPT_EXPR(true);
auto operator=(const VExceptionEmptyParameter &e) V_NOEXCEPT_EXPR(true) -> VExceptionEmptyParameter &;
virtual ~VExceptionEmptyParameter() V_NOEXCEPT_EXPR (true) = default;
virtual ~VExceptionEmptyParameter() V_NOEXCEPT_EXPR(true) = default;
Q_NORETURN virtual void raise() const override { throw *this; }
Q_REQUIRED_RESULT virtual auto clone() const -> VExceptionEmptyParameter * override
{ return new VExceptionEmptyParameter(*this); }
{
return new VExceptionEmptyParameter(*this);
}
virtual auto ErrorMessage() const -> QString override;
virtual auto DetailedInformation() const -> QString override;
@ -62,18 +63,18 @@ public:
auto TagName() const -> QString;
auto LineNumber() const -> qint32;
protected:
private:
/** @brief name name attribute */
QString name;
QString name;
/** @brief tagText tag text */
QString tagText;
QString tagText;
/** @brief tagName tag name */
QString tagName;
QString tagName;
/** @brief lineNumber line number */
qint32 lineNumber;
qint32 lineNumber;
};
//---------------------------------------------------------------------------------------------------------------------

View file

@ -388,10 +388,6 @@ public:
DRW_TableEntry::reset();
}
protected:
auto parseCode(int code, const std::unique_ptr<dxfReader> &reader) -> bool override;
public:
UTF8STRING lineType; /*!< line type, code 6 */
int color; /*!< layer color, code 62 */
int color24; /*!< 24-bit color, code 420 */
@ -399,6 +395,9 @@ public:
DRW_LW_Conv::lineWidth lWeight; /*!< layer lineweight, code 370 */
std::string handlePlotS; /*!< Hard-pointer ID/handle of plotstyle, code 390 */
std::string handleMaterialS; /*!< Hard-pointer ID/handle of materialstyle, code 347 */
private:
auto parseCode(int code, const std::unique_ptr<dxfReader> &reader) -> bool override;
};
//! Class to handle block record entries

View file

@ -64,14 +64,13 @@ public:
auto EvalFormula(const QHash<QString, QSharedPointer<VInternalVariable>> *vars, const QString &formula) -> qreal;
protected:
static auto VarFactory(const QString &a_szName, void *a_pUserData) -> qreal *;
static auto Warning(const QString &warningMsg, qreal value) -> qreal;
private:
Q_DISABLE_COPY_MOVE(Calculator) // NOLINT
QVector<QSharedPointer<qreal>> m_varsValues{};
const QHash<QString, QSharedPointer<VInternalVariable>> *m_vars{nullptr};
static auto VarFactory(const QString &a_szName, void *a_pUserData) -> qreal *;
static auto Warning(const QString &warningMsg, qreal value) -> qreal;
};
#endif // CALCULATOR_H

View file

@ -104,14 +104,6 @@ signals:
*/
void DialogApplied();
protected:
virtual auto IsValid() const -> bool;
void closeEvent(QCloseEvent *event) override;
void showEvent(QShowEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
void changeEvent(QEvent *event) override;
virtual void CheckState();
private slots:
void FilterVariablesEdited(const QString &filter);
@ -158,6 +150,13 @@ private:
auto Eval(const FormulaData &formulaData, bool &flag) -> qreal;
void InitIcons();
virtual auto IsValid() const -> bool;
void closeEvent(QCloseEvent *event) override;
void showEvent(QShowEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
void changeEvent(QEvent *event) override;
virtual void CheckState();
};
//---------------------------------------------------------------------------------------------------------------------

View file

@ -71,17 +71,6 @@ public slots:
void ChosenObject(quint32 id, const SceneObject &type) override;
void ShowDialog(bool click) override;
protected:
/** @brief SaveData Put dialog data in local variables */
void SaveData() override;
void CheckState() override;
void closeEvent(QCloseEvent *event) override;
void showEvent(QShowEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
void changeEvent(QEvent *event) override;
auto IsValid() const -> bool override;
void SetPatternDoc(VAbstractPattern *doc) override;
private slots:
void NameDetailChanged();
void DetailUUIDChanged();
@ -393,6 +382,16 @@ private:
void InitFoldHeightFormula(const VPiece &piece);
void InitFoldWidthFormula(const VPiece &piece);
void InitFoldCenterFormula(const VPiece &piece);
/** @brief SaveData Put dialog data in local variables */
void SaveData() override;
void CheckState() override;
void closeEvent(QCloseEvent *event) override;
void showEvent(QShowEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
void changeEvent(QEvent *event) override;
auto IsValid() const -> bool override;
void SetPatternDoc(VAbstractPattern *doc) override;
};
//---------------------------------------------------------------------------------------------------------------------

View file

@ -64,20 +64,6 @@ signals:
void SignalResized(qreal dLength);
void SignalRotated(qreal dRot, const QPointF &ptNewPos);
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *pME) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent *pME) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *pME) override;
void hoverEnterEvent(QGraphicsSceneHoverEvent *pME) override;
void hoverLeaveEvent(QGraphicsSceneHoverEvent *pME) override;
void Update() override;
void UpdateRectangle();
auto GetAngle(const QPointF &pt) const -> double override;
static auto Rotate(const QPointF &pt, const QPointF &ptCenter, qreal dAng) -> QPointF;
auto GetInsideCorner(int i, qreal dDist) const -> QPointF;
private:
Q_DISABLE_COPY_MOVE(VGrainlineItem) // NOLINT
qreal m_dRotation{0};
@ -106,6 +92,19 @@ private:
void UserMoveAndResize(const QPointF &pos);
void UpdatePolyResize();
void mousePressEvent(QGraphicsSceneMouseEvent *pME) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent *pME) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *pME) override;
void hoverEnterEvent(QGraphicsSceneHoverEvent *pME) override;
void hoverLeaveEvent(QGraphicsSceneHoverEvent *pME) override;
void Update() override;
void UpdateRectangle();
auto GetAngle(const QPointF &pt) const -> double override;
static auto Rotate(const QPointF &pt, const QPointF &ptCenter, qreal dAng) -> QPointF;
auto GetInsideCorner(int i, qreal dDist) const -> QPointF;
};
//---------------------------------------------------------------------------------------------------------------------

View file

@ -85,16 +85,6 @@ public:
auto GetTextLines() const -> vsizetype;
void SetPieceName(const QString &name);
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *pME) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent *pME) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *pME) override;
void hoverEnterEvent(QGraphicsSceneHoverEvent *pME) override;
void hoverMoveEvent(QGraphicsSceneHoverEvent *pHE) override;
void UpdateBox();
void CorrectLabel();
signals:
void SignalResized(qreal iTW);
void SignalRotated(qreal dAng);
@ -125,6 +115,15 @@ private:
void PaintLabelSVGFont(QPainter *painter);
void NotEnoughSpace() const;
void mousePressEvent(QGraphicsSceneMouseEvent *pME) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent *pME) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *pME) override;
void hoverEnterEvent(QGraphicsSceneHoverEvent *pME) override;
void hoverMoveEvent(QGraphicsSceneHoverEvent *pHE) override;
void UpdateBox();
void CorrectLabel();
};
#endif // VTEXTGRAPHICSITEM_H