/usr/include/choqok/choqoktabbar.h is in choqok 1.4+repack-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | /*
This file is part of Choqok, the KDE micro-blogging client
Copyright (C) 2011-2012 Mehrdad Momeny <mehrdad.momeny@gmail.com>
Copyright (C) 2011-2012 Bardia Daneshvar <bardia.daneshvar@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License or (at your option) version 3 or any later version
accepted by the membership of KDE e.V. (or its successor approved
by the membership of KDE e.V.), which shall act as a proxy
defined in Section 14 of version 3 of the license.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see http://www.gnu.org/licenses/
*/
#ifndef CHOQOKTABBAR_H
#define CHOQOKTABBAR_H
#include <QWidget>
#include <QString>
#include <QIcon>
#include "choqok_export.h"
namespace Choqok {
namespace UI {
class ChoqokTabBarPrivate;
class CHOQOK_EXPORT ChoqokTabBar : public QWidget
{
Q_OBJECT
public:
ChoqokTabBar( QWidget *parent = 0 );
~ChoqokTabBar();
enum TabPosition {
North,
South,
West,
East
};
enum SelectionBehavior {
SelectLeftTab,
SelectRightTab,
SelectPreviousTab
};
enum ExtraWidgetPosition {
Top,
Bottom,
Left,
Right
};
void setTabPosition( TabPosition position );
TabPosition tabPosition() const;
void setTabsClosable( bool closeable );
bool tabsClosable() const;
void setCornerWidget( QWidget *w , Qt::Corner corner = Qt::TopRightCorner );
QWidget *cornerWidget( Qt::Corner corner = Qt::TopRightCorner ) const;
void setExtraWidget( QWidget *widget , ExtraWidgetPosition position );
QWidget *extraWidget( ExtraWidgetPosition position );
void setTabAlongsideWidget( QWidget *widget );
QWidget *tabAlongsideWidget() const;
void setTabCloseActivatePrevious( bool stt );
bool tabCloseActivatePrevious() const;
SelectionBehavior selectionBehaviorOnRemove() const;
void setSelectionBehaviorOnRemove ( SelectionBehavior behavior );
QWidget *currentWidget() const;
QWidget *widget( int index ) const;
int currentIndex() const;
int indexOf( QWidget *widget ) const;
int addTab( QWidget *widget , const QString & name );
int addTab( QWidget *widget , const QIcon & icon , const QString & name );
int insertTab( int index , QWidget *widget , const QString & name );
int insertTab( int index , QWidget *widget , const QIcon & icon , const QString & name );
void moveTab( int from , int to );
void removeTab( int index );
void removePage( QWidget *widget );
void setTabIcon( int index , const QIcon & icon );
QIcon tabIcon( int index ) const;
void setTabText( int index , const QString & text );
QString tabText( int index ) const;
/*! With LinkedAllTabBars function, all linked tabbars
* using unique Settings .
*/
void setLinkedTabBar( bool stt );
bool linkedTabBar() const;
void setTabBarHidden( bool stt );
bool isTabBarHidden() const;
QSize iconSize() const;
void setIconSize( const QSize & size );
int count() const;
Qt::ToolButtonStyle toolButtonStyle() const;
void setStyledTabBar( bool stt );
bool styledTabBar() const;
void refreshTabBar();
public slots:
void setCurrentIndex ( int index );
void setCurrentWidget ( QWidget *widget );
void setToolButtonStyle( Qt::ToolButtonStyle toolButtonStyle );
signals:
void currentChanged( int index );
void tabCloseRequested( int index );
void tabMoved( int from , int to );
void contextMenu( const QPoint & point );
void contextMenu( QWidget *widget , const QPoint & point );
void tabPositionChanged( TabPosition position );
void styledPanelSignal( bool stt );
void iconSizeChanged( const QSize & size );
protected:
void resizeEvent( QResizeEvent *event );
void paintEvent( QPaintEvent *event );
private slots:
void action_triggered( QAction *action );
void contextMenuRequest( const QPoint & point );
void widget_destroyed( QObject *obj );
private: // Private Functions
void init_style();
void init_position( TabPosition position );
void init_extra_widget( const QSize & size );
void init_alongside_widget( const QSize & size );
private:
ChoqokTabBarPrivate *p;
};
}
}
#endif // CHOQOKTABBAR_H
|