diff --git a/common/tier4_state_rviz_plugin/src/custom_button.cpp b/common/tier4_state_rviz_plugin/src/custom_button.cpp index 0ef2628577135..26d9d699038d8 100644 --- a/common/tier4_state_rviz_plugin/src/custom_button.cpp +++ b/common/tier4_state_rviz_plugin/src/custom_button.cpp @@ -53,11 +53,13 @@ QSize CustomElevatedButton::sizeHint() const return QSize(width, height); } +// cppcheck-suppress unusedFunction QSize CustomElevatedButton::minimumSizeHint() const { return sizeHint(); } +// cppcheck-suppress unusedFunction void CustomElevatedButton::updateStyle( const QString & text, const QColor & bgColor, const QColor & textColor, const QColor & hoverColor, const QColor & disabledBgColor, const QColor & disabledTextColor) @@ -71,6 +73,7 @@ void CustomElevatedButton::updateStyle( update(); // Force repaint } +// cppcheck-suppress unusedFunction void CustomElevatedButton::paintEvent(QPaintEvent *) { QPainter painter(this); diff --git a/common/tier4_state_rviz_plugin/src/custom_container.cpp b/common/tier4_state_rviz_plugin/src/custom_container.cpp index 0b0aa1ccd6ed5..c82ca685ca9ba 100644 --- a/common/tier4_state_rviz_plugin/src/custom_container.cpp +++ b/common/tier4_state_rviz_plugin/src/custom_container.cpp @@ -26,17 +26,7 @@ CustomContainer::CustomContainer(QWidget * parent) : QFrame(parent), cornerRadiu setLayout(layout); } -void CustomContainer::setCornerRadius(int radius) -{ - cornerRadius = radius; - update(); -} - -int CustomContainer::getCornerRadius() const -{ - return cornerRadius; -} - +// cppcheck-suppress unusedFunction QGridLayout * CustomContainer::getLayout() const { return layout; // Provide access to the layout @@ -50,6 +40,7 @@ QSize CustomContainer::sizeHint() const return QSize(width, height); } +// cppcheck-suppress unusedFunction QSize CustomContainer::minimumSizeHint() const { return sizeHint(); diff --git a/common/tier4_state_rviz_plugin/src/custom_icon_label.cpp b/common/tier4_state_rviz_plugin/src/custom_icon_label.cpp index 6e4d32d40f7fb..28458d7c79d71 100644 --- a/common/tier4_state_rviz_plugin/src/custom_icon_label.cpp +++ b/common/tier4_state_rviz_plugin/src/custom_icon_label.cpp @@ -50,11 +50,13 @@ QSize CustomIconLabel::sizeHint() const return QSize(size, size); } +// cppcheck-suppress unusedFunction QSize CustomIconLabel::minimumSizeHint() const { return sizeHint(); } +// cppcheck-suppress unusedFunction void CustomIconLabel::paintEvent(QPaintEvent *) { QPainter painter(this); diff --git a/common/tier4_state_rviz_plugin/src/custom_label.cpp b/common/tier4_state_rviz_plugin/src/custom_label.cpp index 1f96fc0d45095..59df84138b890 100644 --- a/common/tier4_state_rviz_plugin/src/custom_label.cpp +++ b/common/tier4_state_rviz_plugin/src/custom_label.cpp @@ -46,11 +46,13 @@ QSize CustomLabel::sizeHint() const return QSize(width, height); } +// cppcheck-suppress unusedFunction QSize CustomLabel::minimumSizeHint() const { return sizeHint(); } +// cppcheck-suppress unusedFunction void CustomLabel::paintEvent(QPaintEvent *) { QPainter painter(this); diff --git a/common/tier4_state_rviz_plugin/src/custom_segmented_button.cpp b/common/tier4_state_rviz_plugin/src/custom_segmented_button.cpp index 8063bdc0fbc28..3f93df006415e 100644 --- a/common/tier4_state_rviz_plugin/src/custom_segmented_button.cpp +++ b/common/tier4_state_rviz_plugin/src/custom_segmented_button.cpp @@ -40,6 +40,7 @@ CustomSegmentedButtonItem * CustomSegmentedButton::addButton(const QString & tex return button; } +// cppcheck-suppress unusedFunction QButtonGroup * CustomSegmentedButton::getButtonGroup() const { return buttonGroup; @@ -54,11 +55,13 @@ QSize CustomSegmentedButton::sizeHint() const // layout->itemAt(0)->widget()->height() + 10); } +// cppcheck-suppress unusedFunction QSize CustomSegmentedButton::minimumSizeHint() const { return sizeHint(); } +// cppcheck-suppress unusedFunction void CustomSegmentedButton::paintEvent(QPaintEvent *) { QPainter painter(this); diff --git a/common/tier4_state_rviz_plugin/src/custom_segmented_button_item.cpp b/common/tier4_state_rviz_plugin/src/custom_segmented_button_item.cpp index f2d15260c4e41..3c671c988f936 100644 --- a/common/tier4_state_rviz_plugin/src/custom_segmented_button_item.cpp +++ b/common/tier4_state_rviz_plugin/src/custom_segmented_button_item.cpp @@ -32,17 +32,6 @@ CustomSegmentedButtonItem::CustomSegmentedButtonItem(const QString & text, QWidg setCursor(Qt::PointingHandCursor); } -void CustomSegmentedButtonItem::setColors( - const QColor & bg, const QColor & checkedBg, const QColor & activeText, - const QColor & inactiveText) -{ - bgColor = bg; - checkedBgColor = checkedBg; - activeTextColor = activeText; - inactiveTextColor = inactiveText; - update(); -} - // void CustomSegmentedButtonItem::updateSize() // { // QFontMetrics fm(font()); @@ -51,12 +40,14 @@ void CustomSegmentedButtonItem::setColors( // setFixedSize(width, height); // } +// cppcheck-suppress unusedFunction void CustomSegmentedButtonItem::setHovered(bool hovered) { isHovered = hovered; updateCheckableState(); } +// cppcheck-suppress unusedFunction void CustomSegmentedButtonItem::setCheckableButton(bool checkable) { setCheckable(checkable); @@ -71,18 +62,21 @@ void CustomSegmentedButtonItem::updateCheckableState() update(); } +// cppcheck-suppress unusedFunction void CustomSegmentedButtonItem::setDisabledButton(bool disabled) { isDisabled = disabled; updateCheckableState(); } +// cppcheck-suppress unusedFunction void CustomSegmentedButtonItem::setActivated(bool activated) { isActivated = activated; update(); } +// cppcheck-suppress unusedFunction void CustomSegmentedButtonItem::paintEvent(QPaintEvent *) { QPainter painter(this); diff --git a/common/tier4_state_rviz_plugin/src/custom_slider.cpp b/common/tier4_state_rviz_plugin/src/custom_slider.cpp index cf3f7c3d4638f..16dfda19a87bf 100644 --- a/common/tier4_state_rviz_plugin/src/custom_slider.cpp +++ b/common/tier4_state_rviz_plugin/src/custom_slider.cpp @@ -19,6 +19,7 @@ CustomSlider::CustomSlider(Qt::Orientation orientation, QWidget * parent) setMinimumHeight(40); // Ensure there's enough space for the custom track } +// cppcheck-suppress unusedFunction void CustomSlider::paintEvent(QPaintEvent *) { QPainter painter(this); diff --git a/common/tier4_state_rviz_plugin/src/custom_toggle_switch.cpp b/common/tier4_state_rviz_plugin/src/custom_toggle_switch.cpp index 3b58ded626439..b171fa554cd01 100644 --- a/common/tier4_state_rviz_plugin/src/custom_toggle_switch.cpp +++ b/common/tier4_state_rviz_plugin/src/custom_toggle_switch.cpp @@ -30,6 +30,7 @@ QSize CustomToggleSwitch::sizeHint() const return QSize(50, 30); // Preferred size of the toggle switch } +// cppcheck-suppress unusedFunction void CustomToggleSwitch::paintEvent(QPaintEvent *) { QPainter p(this); diff --git a/common/tier4_state_rviz_plugin/src/include/custom_container.hpp b/common/tier4_state_rviz_plugin/src/include/custom_container.hpp index 5142b409ebc88..ef81ef2417d52 100644 --- a/common/tier4_state_rviz_plugin/src/include/custom_container.hpp +++ b/common/tier4_state_rviz_plugin/src/include/custom_container.hpp @@ -31,12 +31,10 @@ class CustomContainer : public QFrame // Methods to set dimensions and corner radius void setContainerHeight(int height); void setContainerWidth(int width); - void setCornerRadius(int radius); // Getters int getContainerHeight() const; int getContainerWidth() const; - int getCornerRadius() const; QGridLayout * getLayout() const; // Add a method to access the layout protected: diff --git a/common/tier4_state_rviz_plugin/src/include/custom_segmented_button_item.hpp b/common/tier4_state_rviz_plugin/src/include/custom_segmented_button_item.hpp index 33eb9fe16aa31..ee6f48e285975 100644 --- a/common/tier4_state_rviz_plugin/src/include/custom_segmented_button_item.hpp +++ b/common/tier4_state_rviz_plugin/src/include/custom_segmented_button_item.hpp @@ -30,9 +30,6 @@ class CustomSegmentedButtonItem : public QPushButton public: explicit CustomSegmentedButtonItem(const QString & text, QWidget * parent = nullptr); - void setColors( - const QColor & bg, const QColor & checkedBg, const QColor & activeText, - const QColor & inactiveText); void setActivated(bool activated); void setCheckableButton(bool checkable); void setDisabledButton(bool disabled);