tahoma2d/toonz/sources/toonzqt/palettesscanpopup.h
Toshihiro Shimizu 890dddabbd first commit
2016-03-19 02:57:51 +09:00

64 lines
1.2 KiB
C++

#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
using namespace DVGui;
//=============================================================================
// PalettesScanPopup
//-----------------------------------------------------------------------------
class DVAPI PalettesScanPopup : public Dialog
{
Q_OBJECT
FileField *m_field;
QLabel *m_label;
TFilePath m_folderPath;
int m_timerId;
struct Directory {
TFilePath m_path;
TFilePathSet m_files;
TFilePathSet::iterator m_it;
};
std::vector<Directory *> m_stack;
public:
PalettesScanPopup();
void setCurrentFolder(TFilePath path);
TFilePath getCurrentFolder();
protected slots:
void onOkBtnClicked();
protected:
void setLabel(const TFilePath &fp);
void timerEvent(QTimerEvent *event);
void push(const TFilePath &fp);
void push(const TFilePathSet &fs);
void pop();
bool step();
void clearStack();
void onPlt(const TFilePath &fp);
};
#endif //PALETTESCANPOPUP_H