File indexing completed on 2024-04-21 05:50:00
0001 //************************************************************************** 0002 // Copyright 2006 - 2017 Martin Koller, kollix@aon.at 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, version 2 of the License 0007 // 0008 //************************************************************************** 0009 0010 #ifndef _MAIN_WIDGET_H_ 0011 #define _MAIN_WIDGET_H_ 0012 0013 #include <QWidget> 0014 #include <QTime> 0015 #include <kio/global.h> 0016 #include <ui_MainWidgetBase.h> 0017 0018 class Selector; 0019 0020 class MainWidget : public QWidget 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 explicit MainWidget(QWidget *parent); 0026 0027 void setSelector(Selector * s); 0028 KLineEdit *getTargetLineEdit() const { return ui.targetDir; } 0029 0030 public Q_SLOTS: 0031 void setTargetURL(const QString &url); 0032 void startBackup(); 0033 void setIsIncrementalBackup(bool incremental); 0034 0035 private: 0036 Selector *selector; 0037 Ui::MainWidgetBase ui; 0038 0039 private Q_SLOTS: 0040 void getMediaSize(); 0041 void updateElapsed(const QTime &); 0042 void updateTotalBytes(); 0043 void setFileProgress(int percent); 0044 void setCapacity(KIO::filesize_t bytes); 0045 }; 0046 0047 #endif