xref: /glogg/src/tabbedcrawlerwidget.h (revision 093a1bf60100ad8e1e7796bd71e79d000d46c3ec)
1*093a1bf6SNicolas Bonnefon /*
2*093a1bf6SNicolas Bonnefon  * Copyright (C) 2014 Nicolas Bonnefon and other contributors
3*093a1bf6SNicolas Bonnefon  *
4*093a1bf6SNicolas Bonnefon  * This file is part of glogg.
5*093a1bf6SNicolas Bonnefon  *
6*093a1bf6SNicolas Bonnefon  * glogg is free software: you can redistribute it and/or modify
7*093a1bf6SNicolas Bonnefon  * it under the terms of the GNU General Public License as published by
8*093a1bf6SNicolas Bonnefon  * the Free Software Foundation, either version 3 of the License, or
9*093a1bf6SNicolas Bonnefon  * (at your option) any later version.
10*093a1bf6SNicolas Bonnefon  *
11*093a1bf6SNicolas Bonnefon  * glogg is distributed in the hope that it will be useful,
12*093a1bf6SNicolas Bonnefon  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*093a1bf6SNicolas Bonnefon  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*093a1bf6SNicolas Bonnefon  * GNU General Public License for more details.
15*093a1bf6SNicolas Bonnefon  *
16*093a1bf6SNicolas Bonnefon  * You should have received a copy of the GNU General Public License
17*093a1bf6SNicolas Bonnefon  * along with glogg.  If not, see <http://www.gnu.org/licenses/>.
18*093a1bf6SNicolas Bonnefon  */
19*093a1bf6SNicolas Bonnefon 
20*093a1bf6SNicolas Bonnefon #ifndef TABBEDCRAWLERWIDGET_H
21*093a1bf6SNicolas Bonnefon #define TABBEDCRAWLERWIDGET_H
22*093a1bf6SNicolas Bonnefon 
23*093a1bf6SNicolas Bonnefon #include <QTabWidget>
24*093a1bf6SNicolas Bonnefon #include <QTabBar>
25*093a1bf6SNicolas Bonnefon 
26*093a1bf6SNicolas Bonnefon // This class represents glogg's main widget, a tabbed
27*093a1bf6SNicolas Bonnefon // group of CrawlerWidgets.
28*093a1bf6SNicolas Bonnefon // This is a very slightly customised QTabWidget, with
29*093a1bf6SNicolas Bonnefon // a particular stlyle.
30*093a1bf6SNicolas Bonnefon class TabbedCrawlerWidget : public QTabWidget
31*093a1bf6SNicolas Bonnefon {
32*093a1bf6SNicolas Bonnefon   Q_OBJECT
33*093a1bf6SNicolas Bonnefon     public:
34*093a1bf6SNicolas Bonnefon       TabbedCrawlerWidget() : QTabWidget(), myTabBar_() {
35*093a1bf6SNicolas Bonnefon           myTabBar_.setStyleSheet( "QTabBar::tab {\
36*093a1bf6SNicolas Bonnefon                   height: 20px; \
37*093a1bf6SNicolas Bonnefon                   font-size: 9pt; } \
38*093a1bf6SNicolas Bonnefon                   QTabBar::close-button {\
39*093a1bf6SNicolas Bonnefon                   height: 6px; width: 6px; }" );
40*093a1bf6SNicolas Bonnefon           setTabBar( &myTabBar_ );
41*093a1bf6SNicolas Bonnefon       }
42*093a1bf6SNicolas Bonnefon       virtual ~TabbedCrawlerWidget() {}
43*093a1bf6SNicolas Bonnefon     private:
44*093a1bf6SNicolas Bonnefon       QTabBar myTabBar_;
45*093a1bf6SNicolas Bonnefon };
46*093a1bf6SNicolas Bonnefon 
47*093a1bf6SNicolas Bonnefon #endif
48