Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtabbar.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2006 by Gopala Krishna A <krishna.ggk@gmail.com> *
3  * *
4  * This is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2, or (at your option) *
7  * any later version. *
8  * *
9  * This software is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this package; see the file COPYING. If not, write to *
16  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, *
17  * Boston, MA 02110-1301, USA. *
18  ***************************************************************************/
19 
20 #ifndef VERTICALTABBAR_H
21 #define VERTICALTABBAR_H
22 
23 #include "vtabglobal.h"
24 #include "vtabbutton.h"
25 #include <QWidget>
26 #include <Q3PtrList>
27 //Added by qt3to4:
28 #include <Q3VBoxLayout>
29 
30 class Q3VBoxLayout;
31 class VTab;
32 
36 class VTabBar : public QWidget,public VTabInterface
37 {
38  Q_OBJECT
39 public:
40  VTabBar(VTabPosition p = TabLeft,QWidget* parent = 0l, const char* name = 0l);
41 
42  virtual ~VTabBar();
43  VTab* addTab(const QString& caption,int id = -1);
44 
45  VTab* findTab(int id);
46  void setTabToolTip(VTab *tab,const QString &tip);
47  void setTabToolTip(int id,const QString &tip);
48  void removeTab(VTab *tab);
49  void removeTab(int id);
50  bool isAllTabsOff();
51 
52 public slots:
53 
54  void setCurrentTab(VTab *tab);
55  void setCurrentTab(int id);
56  void setPosition(VTabPosition p_pos);
57  void switchOffAllTabs();
58 
59 signals:
60  void activatedTab(int p_id);
61  void activatedTab(VTab *tab);
62  void allTabsOff();
63 
64 private slots:
65  void setTabState(int p_id,bool state);
66 
67 private:
68  int m_index;
69  bool m_tabsOff;
71  Q3VBoxLayout* m_layout;
72  Q3PtrList<VTab> m_tabs;
73 
74 };
75 
76 #endif
bool isAllTabsOff()
Definition: vtabbar.cpp:144
void allTabsOff()
void setTabToolTip(VTab *tab, const QString &tip)
Definition: vtabbar.cpp:65
void setCurrentTab(VTab *tab)
Definition: vtabbar.cpp:105
Q3VBoxLayout * m_layout
Definition: vtabbar.h:71
VTab * findTab(int id)
Definition: vtabbar.cpp:54
void switchOffAllTabs()
Definition: vtabbar.cpp:149
void setTabState(int p_id, bool state)
Definition: vtabbar.cpp:115
virtual ~VTabBar()
Definition: vtabbar.cpp:39
void setPosition(VTabPosition p_pos)
Definition: vtabbar.cpp:162
VTab * addTab(const QString &caption, int id=-1)
Definition: vtabbar.cpp:42
VTabPosition m_position
Definition: vtabbar.h:70
void removeTab(VTab *tab)
Definition: vtabbar.cpp:77
int m_index
Definition: vtabbar.h:68
Q3PtrList< VTab > m_tabs
Definition: vtabbar.h:72
void activatedTab(int p_id)
VTabBar(VTabPosition p=TabLeft, QWidget *parent=0l, const char *name=0l)
Definition: vtabbar.cpp:28
bool m_tabsOff
Definition: vtabbar.h:69