Dooble
Source
dooble_tab_widget.h
1
/*
2
** Copyright (c) 2008 - present, Alexis Megas.
3
** All rights reserved.
4
**
5
** Redistribution and use in source and binary forms, with or without
6
** modification, are permitted provided that the following conditions
7
** are met:
8
** 1. Redistributions of source code must retain the above copyright
9
** notice, this list of conditions and the following disclaimer.
10
** 2. Redistributions in binary form must reproduce the above copyright
11
** notice, this list of conditions and the following disclaimer in the
12
** documentation and/or other materials provided with the distribution.
13
** 3. The name of the author may not be used to endorse or promote products
14
** derived from Dooble without specific prior written permission.
15
**
16
** DOOBLE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
** DOOBLE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*/
27
28
#ifndef dooble_tab_widget_h
29
#define dooble_tab_widget_h
30
31
#include <QTabWidget>
32
33
class
QFrame;
34
class
QToolButton;
35
class
dooble_page
;
36
class
dooble_tab_bar
;
37
38
class
dooble_tab_widget
:
public
QTabWidget
39
{
40
Q_OBJECT
41
42
public
:
43
dooble_tab_widget
(QWidget *parent);
44
QIcon tabIcon(
int
index)
const
;
45
QToolButton *tabs_menu_button(
void
)
const
;
46
bool
is_private(
void
)
const
;
47
dooble_page
*page(
int
index)
const
;
48
void
setTabIcon(
int
index,
const
QIcon &icon);
49
void
setTabTextColor(
int
index,
const
QColor &color);
50
void
setTabToolTip(
int
index,
const
QString &text);
51
52
protected
:
53
void
tabRemoved(
int
index);
54
55
private
:
56
QFrame *m_left_corner_widget;
57
QFrame *m_right_corner_widget;
58
QToolButton *m_add_tab_tool_button;
59
QToolButton *m_private_tool_button;
60
QToolButton *m_tabs_menu_button;
61
dooble_tab_bar
*m_tab_bar;
62
void
prepare_icons(
void
);
63
void
prepare_tab_label(
int
index,
const
QIcon &icon);
64
65
private
slots:
66
void
slot_load_finished(
void
);
67
void
slot_load_started(
void
);
68
void
slot_set_visible_corner_button(
bool
state);
69
void
slot_settings_applied(
void
);
70
void
slot_show_right_corner_widget(
bool
state);
71
72
signals:
73
void
decouple_tab(
int
index);
74
void
empty_tab(
void
);
75
void
new_tab(
void
);
76
void
open_tab_as_new_private_window(
int
index);
77
void
open_tab_as_new_window(
int
index);
78
void
reload_tab(
int
index);
79
void
reload_tab_periodically(
int
index,
int
seconds);
80
void
tabs_menu_button_clicked(
void
);
81
};
82
83
#endif
dooble_tab_bar
Definition:
dooble_tab_bar.h:36
dooble_page
Definition:
dooble_page.h:47
dooble_tab_widget
Definition:
dooble_tab_widget.h:38
Generated by
1.8.13