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 * @param index Index of the tab
98 void selectTab(int index);
102 * @brief Sets the tab at current index active
104 * @param index Index of the tab
106 void setCurrentIndex(int index);
108 /*******************************************************************************
110 ******************************************************************************/
113 * @brief This signal is emitted whenever the current tab changes
115 * @param index Index of the new tab
117 void currentChanged(int index);
120 * @brief This signal is emitted whenever user wants to close a tab
122 * @param index Index of the currently active tab
124 void tabCloseRequested(int index);
126 /*******************************************************************************
128 ******************************************************************************/
130 int m_activeTab; ///< Index of a active tab
132 QButtonGroup *m_tabButtonGroup; ///< Button groub for tab buttons
135 #endif // PANELTABBAR_H