1 /* ============================================================ 2 * 3 * This file is a part of KDE project 4 * 5 * 6 * Date : 2009-09-28 7 * Description : a tool to export image to a KIO accessible 8 * location 9 * 10 * Copyright (C) 2006-2009 by Johannes Wienke <languitar at semipol dot de> 11 * 12 * This program is free software; you can redistribute it 13 * and/or modify it under the terms of the GNU General 14 * Public License as published by the Free Software Foundation; 15 * either version 2, or (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * ============================================================ */ 23 24 #ifndef KIOEXPORTWIDGET_H 25 #define KIOEXPORTWIDGET_H 26 27 // Qt includes 28 29 #include <QWidget> 30 #include <QLabel> 31 #include <QUrl> 32 33 // KDE includes 34 35 #include <kurlrequester.h> 36 37 namespace KIPIPlugins 38 { 39 class KPImagesList; 40 } 41 42 using namespace KIPIPlugins; 43 44 namespace KIPIRemoteStoragePlugin 45 { 46 47 class KioExportWidget: public QWidget 48 { 49 Q_OBJECT 50 51 public: 52 53 /** 54 * Constructor. 55 * 56 * @param parent the parent widget 57 */ 58 explicit KioExportWidget(QWidget* const parent); 59 60 /** 61 * Destructor. 62 */ 63 virtual ~KioExportWidget(); 64 65 /** 66 * Returns a pointer to the imagelist that is displayed. 67 */ 68 KPImagesList* imagesList() const; 69 70 /** 71 * Returns the currently selected target url. Maybe invalid. 72 */ 73 QUrl targetUrl() const; 74 75 /** 76 * Sets the target url this widget should point at. 77 */ 78 void setTargetUrl(const QUrl& url); 79 80 QList<QUrl> history() const; 81 void setHistory(const QList<QUrl>& urls); 82 83 private Q_SLOTS: 84 85 void slotLabelUrlChanged(); 86 void slotShowTargetDialogClicked(bool checked); 87 88 Q_SIGNALS: 89 90 void signalTargetUrlChanged(const QUrl& target); 91 92 private: 93 94 void updateTargetLabel(); 95 96 private: 97 98 KUrlComboRequester* m_targetLabel; 99 QFileDialog* m_targetDialog; 100 QPushButton* m_targetSearchButton; 101 QUrl m_targetUrl; 102 KPImagesList* m_imageList; 103 }; 104 105 } // namespace KIPIRemoteStoragePlugin 106 107 #endif /* KIOEXPORTWIDGET_H */ 108