1/* This file is part of the KDE project
2 Copyright (C) 2009 Dag Andersen <danders@get2net.dk>
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 KPTINSERTFILEDLG_H
21#define KPTINSERTFILEDLG_H
22
23#include "ui_kptinsertfilepanel.h"
24
25#include <kdialog.h>
26
27#include <QWidget>
28
29class KoView;
30
31namespace KPlato
32{
33
34class Project;
35class Node;
36class InsertFilePanel;
37
38class InsertFileDialog : public KDialog
39{
40 Q_OBJECT
41public:
42 InsertFileDialog( Project &project, Node *currentNode, QWidget *parent=0 );
43
44 KUrl url() const;
45 Node *parentNode() const;
46 Node *afterNode() const;
47
48private:
49 InsertFilePanel *m_panel;
50};
51
52
53class InsertFilePanel : public QWidget
54{
55 Q_OBJECT
56public:
57 InsertFilePanel( Project &project, Node *currentNode, QWidget *parent );
58
59 KUrl url() const;
60 Node *parentNode() const;
61 Node *afterNode() const;
62
63 Ui::InsertFilePanel ui;
64
65signals:
66 void enableButtonOk( bool );
67
68protected slots:
69 void changed( const QString& );
70
71 void slotOpenFileDialog( KUrlRequester * );
72
73private:
74 Project &m_project;
75 Node *m_node;
76};
77
78
79} //KPlato namespace
80
81#endif
82