forked from KDE/kdev-upload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profilesfiletree.h
88 lines (71 loc) · 2.24 KB
/
profilesfiletree.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/***************************************************************************
* Copyright 2007 Niko Sams <[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 PROFILESFILETREE_H
#define PROFILESFILETREE_H
#include <QWidget>
#include <kfileitem.h>
class QMenu;
class QModelIndex;
class QComboBox;
class QLabel;
class QUrl;
class KDirOperator;
class KFileItem;
class UploadPlugin;
class AllProfilesModel;
class UploadProfileDlg;
/**
* The Profiles-File-Tree Dock
*
* A ComboBox to select the profile and a KFileTreeView below.
*/
class ProfilesFileTree : public QWidget
{
Q_OBJECT
public:
ProfilesFileTree( UploadPlugin* plugin, QWidget *parent = nullptr );
/**
* Sets the Model for this widget
*/
void setModel(AllProfilesModel* model);
private Q_SLOTS:
/**
* Open the Url in the editor
*/
void openUrl(const QUrl& url);
/**
* Slot called when current profile has changed, sets the new root-url for
* the tree
*/
void profileIndexChanged(int index);
/**
* Slot called when data of the profile has changed, sets the new root url
* (if changed)
*/
void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);
/**
* Modify the current profile
*/
void modifyProfile();
void fileSelected(const KFileItem& item);
void urlEntered();
void contextMenuAboutToShow(KFileItem,QMenu*);
void copyUrl();
void browseUrl();
private:
UploadPlugin* m_plugin;
AllProfilesModel* m_profilesModel;
QComboBox* m_profilesCombo;
QLabel* m_pleaseSelectLabel;
KDirOperator* m_tree;
UploadProfileDlg* m_editProfileDlg;
};
#endif
// kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on