-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar.h
56 lines (42 loc) · 1.66 KB
/
sidebar.h
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
/***************************************************************************
* Copyright (C) 2007 by Pino Toscano <[email protected]> *
* *
* 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) any later version. *
***************************************************************************/
#ifndef _SIDEBAR_H_
#define _SIDEBAR_H_
#include <qwidget.h>
class QIcon;
class QListWidgetItem;
class Sidebar : public QWidget
{
Q_OBJECT
public:
Sidebar( QWidget *parent = 0 );
~Sidebar();
int addItem( const QIcon &icon, const QString &text );
// void setMainWidget( QWidget *widget );
// void setBottomWidget( QWidget *widget );
void setItemEnabled( int index, bool enabled );
bool isItemEnabled( int index ) const;
void setCurrentIndex( int index );
int currentIndex() const;
void setSidebarVisibility( bool visible );
bool isSidebarVisible() const;
signals:
void currentIndexChanged(int);
// private slots:
// void itemClicked( QListWidgetItem *item );
// void splitterMoved( int pos, int index );
// void showTextToggled( bool );
// void iconSizeChanged( QAction *action );
private:
void saveSplitterSize() const;
// private storage
class Private;
Private *d;
};
#endif