2
* Copyright (c) 2010 Mark Liversedge (liversedge@gmail.com)
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the Free
6
* Software Foundation; either version 2 of the License, or (at your option)
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14
* You should have received a copy of the GNU General Public License along
15
* with this program; if not, write to the Free Software Foundation, Inc., 51
16
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
#ifndef GC_QtMacButton_h
20
#define GC_QtMacButton_h
23
#include <QVBoxLayout>
25
#include <QMacCocoaViewContainer>
28
// Qocoa already dit this, so re-used their code, saved a bit of effort!
29
class QtMacButtonWidget;
30
class QtMacButton : public QWidget
34
// Matches NSBezelStyle
47
RoundedDisclosure = 14,
53
explicit QtMacButton(QWidget *parent, BezelStyle bezelStyle = Rounded);
56
void setText(const QString &text);
57
void setToolTip(const QString &text);
58
void setImage(const QPixmap *image);
59
void setChecked(bool checked);
61
void setSelected(bool x);
62
void setIconAndText();
65
void setCheckable(bool checkable);
69
void clicked(bool checked = false);
72
friend class QtMacButtonWidget;
73
QPointer<QtMacButtonWidget> qtw;