tahoma2d/toonz/sources/toonzqt/palettesscanpopup.h

62 lines
1.2 KiB
C
Raw Normal View History

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-15 18:43:10 +12:00
class DVAPI PalettesScanPopup : public DVGui::Dialog {
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);
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);
2016-03-19 06:57:51 +13:00
};
2016-06-15 18:43:10 +12:00
#endif // PALETTESCANPOPUP_H