Fix GNU C++ version check
[LibreOffice.git] / vcl / inc / qt5 / QtInstanceButton.hxx
blobc25342e0bc83e1b578b903a4ee789aced28471ff
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #pragma once
12 #include "QtInstanceWidget.hxx"
14 #include <QtCore/QObject>
15 #include <QtWidgets/QPushButton>
17 class QtInstanceButton : public QtInstanceWidget, public virtual weld::Button
19 QPushButton* m_pButton;
21 public:
22 QtInstanceButton(QPushButton* pButton);
24 virtual void set_label(const OUString& rText) override;
25 virtual void set_image(VirtualDevice* pDevice) override;
26 virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) override;
27 virtual void set_from_icon_name(const OUString& rIconName) override;
28 virtual OUString get_label() const override;
29 virtual void set_font(const vcl::Font& rFont) override;
30 virtual void set_custom_button(VirtualDevice* pDevice) override;
32 virtual void connect_clicked(const Link<Button&, void>& rLink) override;
34 // whether a custom click handler is set for the given button
35 // (s.a. weld::Button::is_custom_handler_set which would give the
36 // same result if called on the corresponding QtInstanceButton)
37 static bool hasCustomClickHandler(QAbstractButton& rButton);
39 private slots:
40 void buttonClicked();
43 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */