~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to buildtools/autotools/fileselectorwidget.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
*   Copyright (C) 2001 by Bernd Gehrmann                                  *
 
3
*   bernd@kdevelop.org                                                    *
 
4
*                                                                         *
 
5
*   This program is free software; you can redistribute it and/or modify  *
 
6
*   it under the terms of the GNU General Public License as published by  *
 
7
*   the Free Software Foundation; either version 2 of the License, or     *
 
8
*   (at your option) any later version.                                   *
 
9
*                                                                         *
 
10
***************************************************************************/
 
11
 
 
12
#ifndef _FILESELECTORWIDGET_H_
 
13
#define _FILESELECTORWIDGET_H_
 
14
 
 
15
#include <qlayout.h>
 
16
#include <qpushbutton.h>
 
17
#include <qhbox.h>
 
18
#include <qlabel.h>
 
19
#include <qstrlist.h>
 
20
#include <qtooltip.h>
 
21
 
 
22
#include <klistview.h>
 
23
#include <qvbox.h>
 
24
#include <qwidget.h>
 
25
#include <kfile.h>
 
26
#include <kurlcombobox.h>
 
27
#include <kurlcompletion.h>
 
28
#include <kcombobox.h>
 
29
#include <kprotocolinfo.h>
 
30
 
 
31
#include <kfileview.h>
 
32
#include <kfileitem.h>
 
33
 
 
34
#include <kdiroperator.h>
 
35
 
 
36
class AutoProjectPart;
 
37
class SubprojectItem;
 
38
class KFile;
 
39
 
 
40
class KDnDDirOperator : public KDirOperator
 
41
{
 
42
        Q_OBJECT
 
43
 
 
44
public:
 
45
        KDnDDirOperator ( const KURL& urlName = KURL(), QWidget *parent = 0, const char* name = 0 );
 
46
 
 
47
protected:
 
48
        virtual KFileView* createView( QWidget* parent, KFile::FileView view );
 
49
};
 
50
 
 
51
class FileSelectorWidget : public QWidget
 
52
{
 
53
        Q_OBJECT
 
54
 
 
55
public:
 
56
        FileSelectorWidget( AutoProjectPart* part, KFile::Mode, QWidget* parent = 0, const char* name = 0 );
 
57
        ~FileSelectorWidget();
 
58
 
 
59
        KDnDDirOperator * dirOperator()
 
60
        {
 
61
                return dir;
 
62
        }
 
63
 
 
64
public slots:
 
65
        void slotFilterChanged( const QString& );
 
66
        void setDir( KURL );
 
67
        void setDir( const QString& );
 
68
 
 
69
private slots:
 
70
        void cmbPathActivated( const KURL& u );
 
71
        void cmbPathReturnPressed( const QString& u );
 
72
        void dirUrlEntered( const KURL& u );
 
73
        void dirFinishedLoading();
 
74
        void filterReturnPressed( const QString& nf );
 
75
 
 
76
protected:
 
77
        void focusInEvent( QFocusEvent* );
 
78
        void dragEnterEvent ( QDragEnterEvent* ev );
 
79
        void dropEvent ( QDropEvent* ev );
 
80
 
 
81
private:
 
82
        KURLComboBox *cmbPath;
 
83
        KHistoryCombo * filter;
 
84
        QLabel* filterIcon;
 
85
        KDnDDirOperator * dir;
 
86
        QPushButton *home, *up, *back, *forward;
 
87
        AutoProjectPart* m_part;
 
88
 
 
89
signals:
 
90
        void dropped ( const QString& );
 
91
 
 
92
};
 
93
 
 
94
#endif 
 
95
// kate: indent-mode csands; tab-width 4;
 
96