1/* This file is part of the KDE project
2 * Copyright (C) 2007 Fredy Yanardi <fyanardi@gmail.com>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#ifndef KPTVIEWLISTDOCKER_H
21#define KPTVIEWLISTDOCKER_H
22
23#include <QDockWidget>
24#include <KoDockFactoryBase.h>
25
26namespace KPlato
27{
28
29class View;
30class ViewListWidget;
31
32class ViewListDocker : public QDockWidget
33{
34 Q_OBJECT
35
36public:
37 explicit ViewListDocker(View *view);
38 ~ViewListDocker();
39 View *view();
40 void setView(View *view);
41 ViewListWidget *viewList() const { return m_viewlist; }
42
43public slots:
44 void slotModified();
45 void updateWindowTitle( bool modified );
46
47private:
48 View *m_view;
49 ViewListWidget *m_viewlist;
50};
51
52class ViewListDockerFactory : public KoDockFactoryBase
53{
54public:
55 explicit ViewListDockerFactory(View *view);
56
57 virtual QString id() const;
58 virtual QDockWidget* createDockWidget();
59 /// @return the dock widget area the widget should appear in by default
60 virtual KoDockFactoryBase::DockPosition defaultDockPosition() const { return DockLeft; }
61
62private:
63 View *m_view;
64};
65
66} //namespace KPlato
67
68#endif
69