File indexing completed on 2024-04-14 04:31:18
0001 /*************************************************************************** 0002 * Copyright 2007 Niko Sams <niko.sams@gmail.com> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify * 0005 * it under the terms of the GNU General Public License as published by * 0006 * the Free Software Foundation; either version 2 of the License, or * 0007 * (at your option) any later version. * 0008 * * 0009 ***************************************************************************/ 0010 0011 #ifndef UPLOADPROFILEDLG_H 0012 #define UPLOADPROFILEDLG_H 0013 0014 #include <QDialog> 0015 0016 class QUrl; 0017 class QListWidgetItem; 0018 namespace Ui { 0019 class UploadProfileDlg; 0020 } 0021 class UploadProfileItem; 0022 0023 /** 0024 * Dialog to edit a upload profile 0025 */ 0026 class UploadProfileDlg : public QDialog 0027 { 0028 Q_OBJECT 0029 public: 0030 UploadProfileDlg( QWidget *parent = nullptr ); 0031 ~UploadProfileDlg() override; 0032 0033 public Q_SLOTS: 0034 /** 0035 * Opens the Dialog to edit an upload profile 0036 * @return dialog's result code, Accepted or Rejected. 0037 */ 0038 int editProfile(UploadProfileItem* item); 0039 0040 private Q_SLOTS: 0041 /** 0042 * Opens a directory browser to select the path 0043 */ 0044 void browse(); 0045 /** 0046 * Opens a directory browser to select the local path 0047 */ 0048 void browseLocal(); 0049 0050 protected Q_SLOTS: 0051 /** 0052 * Implemented to accept() not if the entered url does not exist 0053 */ 0054 virtual void slotAcceptButtonClicked(); 0055 0056 private: 0057 /** 0058 * Builds the Url from the current entered data 0059 */ 0060 QUrl currentUrl(); 0061 0062 /** 0063 * Sets the values of the widgets to the given url 0064 */ 0065 void updateUrl( const QUrl& url ); 0066 0067 Ui::UploadProfileDlg* m_ui; 0068 0069 }; 0070 0071 0072 #endif 0073 // kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on