summaryrefslogtreecommitdiffstats
path: root/kicker/extensions/sidebar/sidebarextension.h
blob: a44c270ba66b817eb70878bcb7276bb95a85557d (plain)
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
/***************************************************************************
                               sidebarextension.h
                             -------------------
    begin                : Sun July 20 16:00:00 CEST 2003
    copyright            : (C) 2003 Joseph Wenninger
    email                : jowenn@kde.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 SIDEBAREXTENSION_H
#define SIDEBAREXTENSION_H

#include <kpanelextension.h>
#include <kurl.h>
#include <kparts/browserextension.h>

class QHBoxLayout;
class QVBox;

class SidebarExtension : public KPanelExtension
{
    Q_OBJECT

public:
    SidebarExtension( const QString& configFile,
                     Type t = Normal,
                     int actions = 0,
                     QWidget *parent = 0, const char *name = 0 );

    virtual ~SidebarExtension();

    QSize sizeHint( Position, QSize maxSize ) const;
    Position preferedPosition() const;

    virtual void positionChange( Position position );

protected:
    virtual void about();
    virtual void preferences();
    virtual bool eventFilter( QObject *o, QEvent *e );
protected slots:
    void openURLRequest( const KURL &, const KParts::URLArgs &);
    void needLayoutUpdate(bool);

private:
    int m_currentWidth;
    int m_x;
    QFrame *m_resizeHandle;
    bool m_resizing;
    int m_expandedSize;
    QHBoxLayout *m_layout;
    QVBox *m_sbWrapper;
};

#endif