libyui-qt
Loading...
Searching...
No Matches
QY2ComboTabWidget.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: QY2ComboTabWidget.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23 This is a pure Qt widget - it can be used independently of YaST2.
24
25/-*/
26
27
28#ifndef QY2ComboTabWidget_h
29#define QY2ComboTabWidget_h
30
31#include <QString>
32#include <QHash>
33#include <QWidget>
34
35class QComboBox;
36class QLabel;
37class QStackedWidget;
38class QWidget;
39
40
45class QY2ComboTabWidget : public QWidget
46{
47 Q_OBJECT
48
49public:
50
55 QY2ComboTabWidget( const QString & combo_box_label,
56 QWidget * parent = 0,
57 const char * name = 0 );
58
62 virtual ~QY2ComboTabWidget();
63
68 void addPage( const QString & page_label, QWidget * page );
69
70
71signals:
72
77 void currentChanged( QWidget * newCurrentPage );
78
79
80public slots:
81
87 void showPage( QWidget * page );
88
89
90protected slots:
91
96 void showPageIndex( int index );
97
98
99protected:
100
101 QComboBox * combo_box;
102 QLabel * combo_label;
103 QStackedWidget * widget_stack;
104 QHash<int, QWidget *> pages;
105};
106
107#endif // QY2ComboTabWidget_h
Definition QY2ComboTabWidget.h:46
QY2ComboTabWidget(const QString &combo_box_label, QWidget *parent=0, const char *name=0)
Definition QY2ComboTabWidget.cc:49
void currentChanged(QWidget *newCurrentPage)
void showPageIndex(int index)
Definition QY2ComboTabWidget.cc:107
virtual ~QY2ComboTabWidget()
Definition QY2ComboTabWidget.cc:88
void addPage(const QString &page_label, QWidget *page)
Definition QY2ComboTabWidget.cc:95
void showPage(QWidget *page)
Definition QY2ComboTabWidget.cc:125