Skip to content
Snippets Groups Projects
Commit da87077a authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm Q_OBJECT from several files; correct some protected/private labels

parent a4b027f3
No related branches found
No related tags found
1 merge request!1447rm Q_OBJECT where not needed (#515); copy edit GUI header files
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <qcustomplot.h> #include <qcustomplot.h>
class SpecularDataItem : public DataItem { class SpecularDataItem : public DataItem {
Q_OBJECT
public: public:
static constexpr auto M_TYPE{"SpecularData"}; static constexpr auto M_TYPE{"SpecularData"};
......
...@@ -24,10 +24,7 @@ ...@@ -24,10 +24,7 @@
//! as a list of items that is required for simultaneous, synchronous work while plotting and //! as a list of items that is required for simultaneous, synchronous work while plotting and
//! changing their properties. //! changing their properties.
class QObject;
class DataAccessWidget : public QWidget { class DataAccessWidget : public QWidget {
Q_OBJECT
public: public:
explicit DataAccessWidget(QWidget* parent = nullptr); explicit DataAccessWidget(QWidget* parent = nullptr);
~DataAccessWidget() override; ~DataAccessWidget() override;
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
//! Widget to edit properties of an IntensityDataItem. //! Widget to edit properties of an IntensityDataItem.
class IntensityDataPropertyWidget : public DataPropertyWidget { class IntensityDataPropertyWidget : public DataPropertyWidget {
Q_OBJECT
public: public:
explicit IntensityDataPropertyWidget(QWidget* parent = nullptr); explicit IntensityDataPropertyWidget(QWidget* parent = nullptr);
......
...@@ -28,7 +28,6 @@ class InstrumentLibraryEditor; ...@@ -28,7 +28,6 @@ class InstrumentLibraryEditor;
class InstrumentLibraryEditor : public QDialog { class InstrumentLibraryEditor : public QDialog {
Q_OBJECT Q_OBJECT
public: public:
InstrumentLibraryEditor(QWidget* parent, InstrumentLibrary* instrumentLibrary); InstrumentLibraryEditor(QWidget* parent, InstrumentLibrary* instrumentLibrary);
~InstrumentLibraryEditor() override; ~InstrumentLibraryEditor() override;
...@@ -55,7 +54,6 @@ private: ...@@ -55,7 +54,6 @@ private:
void onInstrumentDescriptionEdited(const QString& t); void onInstrumentDescriptionEdited(const QString& t);
void onInstrumentChangedByEditor(); void onInstrumentChangedByEditor();
private:
//! A model extension for InstrumentsTreeModel which //! A model extension for InstrumentsTreeModel which
//! * shows a "NEW" sign in the icon of a newly added instrument. //! * shows a "NEW" sign in the icon of a newly added instrument.
//! * creates a HTML text for the Display role //! * creates a HTML text for the Display role
......
...@@ -25,8 +25,6 @@ class MultiInstrumentNotifier; ...@@ -25,8 +25,6 @@ class MultiInstrumentNotifier;
//! //!
//! Used e.g. to present the instrument list in the instrument view. //! Used e.g. to present the instrument list in the instrument view.
class InstrumentListModel : public QAbstractListModel { class InstrumentListModel : public QAbstractListModel {
Q_OBJECT
public: public:
InstrumentListModel(QObject* parent, MultiInstrumentNotifier* ec); InstrumentListModel(QObject* parent, MultiInstrumentNotifier* ec);
...@@ -51,7 +49,6 @@ private: ...@@ -51,7 +49,6 @@ private:
QModelIndex addNewInstrument(); QModelIndex addNewInstrument();
void onInstrumentNameChanged(const InstrumentItem* instrument); void onInstrumentNameChanged(const InstrumentItem* instrument);
private:
MultiInstrumentNotifier* m_ec; MultiInstrumentNotifier* m_ec;
QIcon m_gisasIcon; QIcon m_gisasIcon;
QIcon m_offspecIcon; QIcon m_offspecIcon;
......
...@@ -28,18 +28,15 @@ class QCheckBox; ...@@ -28,18 +28,15 @@ class QCheckBox;
class QWidgetAction; class QWidgetAction;
class InstrumentView : public QWidget { class InstrumentView : public QWidget {
Q_OBJECT
public: public:
InstrumentView(QWidget* parent, ProjectDocument* document); InstrumentView(QWidget* parent, ProjectDocument* document);
void fillViewMenu(QMenu* menu); void fillViewMenu(QMenu* menu);
ProjectDocument::Functionalities functionalities() const; ProjectDocument::Functionalities functionalities() const;
protected: private:
void showEvent(QShowEvent*) override; void showEvent(QShowEvent*) override;
void hideEvent(QHideEvent*) override; void hideEvent(QHideEvent*) override;
private:
void createWidgetsForCurrentInstrument(); void createWidgetsForCurrentInstrument();
void onInstrumentNameEdited(const QString& newName); void onInstrumentNameEdited(const QString& newName);
void onInstrumentdescriptionEdited(const QString& t); void onInstrumentdescriptionEdited(const QString& t);
...@@ -49,7 +46,6 @@ private: ...@@ -49,7 +46,6 @@ private:
void onFunctionalityChanged(); void onFunctionalityChanged();
void updateSingleInstrumentMode(); void updateSingleInstrumentMode();
private:
InstrumentListView* m_instrumentListView; InstrumentListView* m_instrumentListView;
ProjectDocument* m_document; ProjectDocument* m_document;
QScrollArea* m_scrollArea; QScrollArea* m_scrollArea;
......
...@@ -22,7 +22,6 @@ class QBoxLayout; ...@@ -22,7 +22,6 @@ class QBoxLayout;
//! About BornAgain dialog. //! About BornAgain dialog.
class AboutDialog : public QDialog { class AboutDialog : public QDialog {
Q_OBJECT
public: public:
AboutDialog(QWidget* parent = nullptr); AboutDialog(QWidget* parent = nullptr);
......
...@@ -26,15 +26,12 @@ class ScientificPlot; ...@@ -26,15 +26,12 @@ class ScientificPlot;
//! on resize events. //! on resize events.
class FontScalingEvent : public QObject { class FontScalingEvent : public QObject {
Q_OBJECT
public: public:
explicit FontScalingEvent(ScientificPlot* plot, QWidget* parent); explicit FontScalingEvent(ScientificPlot* plot, QWidget* parent);
protected: private:
bool eventFilter(QObject* obj, QEvent* event) override; bool eventFilter(QObject* obj, QEvent* event) override;
private:
void backupFonts(); void backupFonts();
void restoreFonts(); void restoreFonts();
void scaleFonts(double factor); void scaleFonts(double factor);
......
...@@ -31,6 +31,7 @@ int default_label_height() ...@@ -31,6 +31,7 @@ int default_label_height()
} // namespace } // namespace
StatusLabel::StatusLabel(QWidget* parent) StatusLabel::StatusLabel(QWidget* parent)
: QFrame(parent) : QFrame(parent)
, m_font("Monospace", default_text_size(), QFont::Normal, false) , m_font("Monospace", default_text_size(), QFont::Normal, false)
......
...@@ -26,8 +26,6 @@ class QPaintEvent; ...@@ -26,8 +26,6 @@ class QPaintEvent;
//! depending from available space. //! depending from available space.
class StatusLabel : public QFrame { class StatusLabel : public QFrame {
Q_OBJECT
public: public:
explicit StatusLabel(QWidget* parent = nullptr); explicit StatusLabel(QWidget* parent = nullptr);
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
//! The StyledToolbar class represents our standard narrow toolbar with the height 24 pixels. //! The StyledToolbar class represents our standard narrow toolbar with the height 24 pixels.
class StyledToolbar : public QToolBar { class StyledToolbar : public QToolBar {
Q_OBJECT
public: public:
explicit StyledToolbar(QWidget* parent = nullptr); explicit StyledToolbar(QWidget* parent = nullptr);
void addStyledSeparator(); void addStyledSeparator();
...@@ -30,8 +28,6 @@ public: ...@@ -30,8 +28,6 @@ public:
protected: protected:
void paintEvent(QPaintEvent* event) override; void paintEvent(QPaintEvent* event) override;
protected:
void contextMenuEvent(QContextMenuEvent*) override; void contextMenuEvent(QContextMenuEvent*) override;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment