2016-05-17 03:04:11 +12:00
|
|
|
#pragma once
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
#ifndef PALETTESCANPOPUP_H
|
|
|
|
#define PALETTESCANPOPUP_H
|
|
|
|
|
|
|
|
#include "toonzqt/dvdialog.h"
|
|
|
|
#include "toonzqt/filefield.h"
|
|
|
|
|
|
|
|
#include "toonz/studiopalette.h"
|
|
|
|
|
|
|
|
#undef DVAPI
|
|
|
|
#undef DVVAR
|
|
|
|
#ifdef TOONZQT_EXPORTS
|
|
|
|
#define DVAPI DV_EXPORT_API
|
|
|
|
#define DVVAR DV_EXPORT_VAR
|
|
|
|
#else
|
|
|
|
#define DVAPI DV_IMPORT_API
|
|
|
|
#define DVVAR DV_IMPORT_VAR
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
// PalettesScanPopup
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2016-06-29 18:17:12 +12:00
|
|
|
class DVAPI PalettesScanPopup final : public DVGui::Dialog {
|
2016-06-15 18:43:10 +12:00
|
|
|
Q_OBJECT
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
DVGui::FileField *m_field;
|
|
|
|
QLabel *m_label;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
TFilePath m_folderPath;
|
|
|
|
int m_timerId;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
struct Directory {
|
|
|
|
TFilePath m_path;
|
|
|
|
TFilePathSet m_files;
|
|
|
|
TFilePathSet::iterator m_it;
|
|
|
|
};
|
|
|
|
std::vector<Directory *> m_stack;
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
public:
|
2016-06-15 18:43:10 +12:00
|
|
|
PalettesScanPopup();
|
2016-03-19 06:57:51 +13:00
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
void setCurrentFolder(TFilePath path);
|
|
|
|
TFilePath getCurrentFolder();
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
protected slots:
|
2016-06-15 18:43:10 +12:00
|
|
|
void onOkBtnClicked();
|
2016-03-19 06:57:51 +13:00
|
|
|
|
|
|
|
protected:
|
2016-06-15 18:43:10 +12:00
|
|
|
void setLabel(const TFilePath &fp);
|
2016-06-19 20:06:29 +12:00
|
|
|
void timerEvent(QTimerEvent *event) override;
|
2016-06-15 18:43:10 +12:00
|
|
|
void push(const TFilePath &fp);
|
|
|
|
void push(const TFilePathSet &fs);
|
|
|
|
void pop();
|
|
|
|
bool step();
|
|
|
|
void clearStack();
|
|
|
|
void onPlt(const TFilePath &fp);
|
2016-03-19 06:57:51 +13:00
|
|
|
};
|
|
|
|
|
2016-06-15 18:43:10 +12:00
|
|
|
#endif // PALETTESCANPOPUP_H
|