1
/** \file tab.h */ // -*-c++-*-
3
// Copyright (C) 2010 Piotr Galiszewski
5
// This program is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU General Public License as
7
// published by the Free Software Foundation; either version 2 of the
8
// License, or (at your option) any later version.
10
// This program is distributed in the hope that it will be useful, but
11
// WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
// General Public License for more details.
15
// You should have received a copy of the GNU General Public License
16
// along with this program; see the file COPYING. If not, write to
17
// the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
// Boston, MA 02111-1307, USA.
20
#ifndef APTITUDE_QT_TAB_H
21
#define APTITUDE_QT_TAB_H
23
#include <QtCore/QObject>
24
#include <QtGui/QWidget>
32
/** \brief tab is a base class for tabs shown in main window's tab widget.
35
* Every tab has a name, which will be displayed in the UI, and a type,
36
* indicating which of the UI pages it implements
38
class tab : public QWidget
43
/** \brief Indicates tab type */
53
/** \brief What to do when the tab is closed. */
56
/** Destroy the tab when it's closed. */
57
closing_policy_destroy,
58
/** Hide the tab when it's closed. */
65
const closing_policy policy;
67
/** \todo Shouldn't this be const? */
71
/** \brief Create a new tab object with the given type and parent. */
72
explicit tab(tab_type type, closing_policy _policy, QWidget *parent = 0);
76
/** \brief Retrieve the name of this tab. */
77
const QString & get_name() const { return name; }
79
/** \brief Retrieve the description of this tab.
81
* The description is used as the tooltip of the tab.
83
const QString & get_description() const { return description; }
85
/** \brief Retrieve the type of this tab. */
86
tab_type get_type() { return type; }
88
/** \brief Retrieve the closing policy of this tab. */
89
closing_policy get_policy() { return policy; }
96
#endif // APTITUDE_QT_TAB_H