You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.9 KiB
62 lines
1.9 KiB
#ifndef COPYITEMDIALOG_H
|
|
#define COPYITEMDIALOG_H
|
|
|
|
#include <QDialog>
|
|
#include <QDir>
|
|
#include <QFileInfo>
|
|
#include "notebook.h"
|
|
#include "sectiongroup.h"
|
|
#include "notebooklist.h"
|
|
#include "notebookmanager.h"
|
|
|
|
namespace Ui {
|
|
class CopyItemDialog;
|
|
}
|
|
|
|
class CopyItemDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit CopyItemDialog(bool moveItem, QStringList notebookColorList, QStringList notebookDirList, QStringList list, QString itemName, QString itemLocation, QWidget *parent = nullptr);
|
|
~CopyItemDialog();
|
|
|
|
void init();
|
|
void addItemsToDirectory();
|
|
/* Function written by ssendeavour: https://gist.github.com/ssendeavour/7324701#file-copy-recursively-cpp */
|
|
static bool copyRecursively(const QString &srcFilePath, const QString &tgtFilePath);
|
|
|
|
QIcon SetNotebookIcon(QString notebookColor);
|
|
QIcon SetSectionGroupIcon(QString sectionGroupColor);
|
|
|
|
/* Getters */
|
|
bool getMoveItemState() const;
|
|
QStringList getDirectories() const;
|
|
QStringList getNotebookDirList() const;
|
|
QStringList getNotebookColorList() const;
|
|
QString getFileName() const;
|
|
QString getFileLocation() const;
|
|
|
|
/* Setters */
|
|
void setMoveItemState(bool updateMoveState);
|
|
void setDirectories(QStringList dirList);
|
|
void setNotebookDirList(QStringList nbDirList);
|
|
void setNotebookColorList(QStringList nbColorList);
|
|
void setFileName(QString newItemName);
|
|
void setFileLocation(QString newItemLocation);
|
|
|
|
private slots:
|
|
void on_buttonBox_accepted();
|
|
void on_buttonBox_rejected();
|
|
|
|
private:
|
|
Ui::CopyItemDialog *ui;
|
|
bool moveItemState;
|
|
QString var_itemName;
|
|
QString var_itemLocation;
|
|
QStringList notebookdirList; // Actual Filepaths of each Notebook or Section Group.
|
|
QStringList var_directoryList; // Directories displayed on the ComboBox of Directory List
|
|
QStringList notebookcolorlist; // Icon Colors of Notebook or Section Group
|
|
};
|
|
|
|
#endif // COPYITEMDIALOG_H
|
|
|