My Project  0.0.16
QUCS Mapping
 All Classes Namespaces 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.h>
26 #include <qptrlist.h>
27 
28 class QVBoxLayout;
29 class VTab;
30 
34 class VTabBar : public QWidget,public VTabInterface
35 {
36  Q_OBJECT
37 public:
38  VTabBar(VTabPosition p = TabLeft,QWidget* parent = 0l, const char* name = 0l);
39 
40  virtual ~VTabBar();
41  VTab* addTab(const QString& caption,int id = -1);
42 
43  VTab* findTab(int id);
44  void setTabToolTip(VTab *tab,const QString &tip);
45  void setTabToolTip(int id,const QString &tip);
46  void removeTab(VTab *tab);
47  void removeTab(int id);
48  bool isAllTabsOff();
49 
50 public slots:
51 
52  void setCurrentTab(VTab *tab);
53  void setCurrentTab(int id);
54  void setPosition(VTabPosition p_pos);
55  void switchOffAllTabs();
56 
57 signals:
58  void activatedTab(int p_id);
59  void activatedTab(VTab *tab);
60  void allTabsOff();
61 
62 private slots:
63  void setTabState(int p_id,bool state);
64 
65 private:
66  int m_index;
67  bool m_tabsOff;
68  VTabPosition m_position;
69  QVBoxLayout* m_layout;
70  QPtrList<VTab> m_tabs;
71 
72 };
73 
74 #endif