LMMS
Loading...
Searching...
No Matches
TabButton.h
Go to the documentation of this file.
1/*
2 * TabButton.h - declaration of class TabButton
3 *
4 * Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
5 *
6 * This file is part of LMMS - https://lmms.io
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
22 *
23 */
24
25#ifndef LMMS_GUI_TAB_BUTTON_H
26#define LMMS_GUI_TAB_BUTTON_H
27
28#include <QPushButton>
29
30namespace lmms::gui
31{
32
33
34class TabButton : public QPushButton
35{
36 Q_OBJECT
37public:
38 TabButton( const QString & _text, int _id, QWidget * _parent ) :
39 QPushButton( _text, _parent ),
40 m_id( _id )
41 {
42 setCheckable( true );
43 connect( this, SIGNAL( clicked() ), this,
44 SLOT( slotClicked() ) );
45 }
46
47 ~TabButton() override = default;
48
49
50signals:
51 void clicked( int );
52
53
54protected slots:
56 {
57 emit clicked( m_id );
58 }
59
60
61private:
62 int m_id;
63
64} ;
65
66
67} // namespace lmms::gui
68
69#endif // LMMS_GUI_TAB_BUTTON_H
~TabButton() override=default
void slotClicked()
Definition TabButton.h:55
int m_id
Definition TabButton.h:62
TabButton(const QString &_text, int _id, QWidget *_parent)
Definition TabButton.h:38
Definition AudioPortAudio.cpp:223
#define SIGNAL
Definition tap_pinknoise.c:34