2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Pekka Nissinen - pekka.nissinen@ixonos.com
7 Situare is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 version 2 as published by the Free Software Foundation.
11 Situare is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Situare; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
30 * @brief Class for tab bar
32 * @author Pekka Nissinen - pekka.nissinen@ixonos.com
34 class PanelTabBar : public QWidget
42 * @param parent Parent
44 PanelTabBar(QWidget *parent = 0);
46 /*******************************************************************************
47 * MEMBER FUNCTIONS AND SLOTS
48 ******************************************************************************/
53 * Adds a tab with icon and returns the index of the inserted tab
55 * @param icon Icon of the tab
57 int addTab(const QIcon& icon);
60 * @brief Inserts a tab
62 * Inserts a tab with icon at the specified index and returns the index of the inserted tab.
63 * If index is out of range, the tab is appended.
65 * @param index Index of the tab
66 * @param icon Icon of the tab
68 int insertTab(int index, const QIcon& icon);
71 * @brief Removes a tab
73 * Removes a tab at index position
75 * @todo: Fix tab drawing order
77 * @param index Index of the tab
79 void removeTab(int index);
83 * @brief Initializes and formats tab buttons layout
85 void setUpTabLayout();
89 * @brief This slot is used to clear tab selections
94 * @brief This slot selects a tab at given index
96 void selectTab(int index);
100 * @brief Sets the tab at current index active
102 * @param index Index of the tab
104 void setCurrentIndex(int index);
106 /*******************************************************************************
108 ******************************************************************************/
111 * @brief This signal is emitted whenever the current tab index changes
113 void currentChanged(int index);
116 * @brief This signal is emitted whenever user wants to close a tab
118 void tabCloseRequested(int index);
120 /*******************************************************************************
122 ******************************************************************************/
124 int m_activeTab; ///< Index of a active tab
126 QButtonGroup *m_tabButtonGroup; ///< Button groub for tab buttons
129 #endif // PANELTABBAR_H