Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef PALETTESCANPOPUP_H
Toshihiro Shimizu 890ddd
#define PALETTESCANPOPUP_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "toonzqt/dvdialog.h"
Toshihiro Shimizu 890ddd
#include "toonzqt/filefield.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "toonz/studiopalette.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TOONZQT_EXPORTS
Toshihiro Shimizu 890ddd
#define DVAPI DV_EXPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_EXPORT_VAR
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define DVAPI DV_IMPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_IMPORT_VAR
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=============================================================================
Toshihiro Shimizu 890ddd
// PalettesScanPopup
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class DVAPI PalettesScanPopup final : public DVGui::Dialog {
Shinya Kitaoka 120a6e
  Q_OBJECT
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  DVGui::FileField *m_field;
Shinya Kitaoka 120a6e
  QLabel *m_label;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TFilePath m_folderPath;
Shinya Kitaoka 120a6e
  int m_timerId;
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  struct Directory {
Shinya Kitaoka 120a6e
    TFilePath m_path;
Shinya Kitaoka 120a6e
    TFilePathSet m_files;
Shinya Kitaoka 120a6e
    TFilePathSet::iterator m_it;
Shinya Kitaoka 120a6e
  };
Shinya Kitaoka 120a6e
  std::vector<directory *=""> m_stack;</directory>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  PalettesScanPopup();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void setCurrentFolder(TFilePath path);
Shinya Kitaoka 120a6e
  TFilePath getCurrentFolder();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected slots:
Shinya Kitaoka 120a6e
  void onOkBtnClicked();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Shinya Kitaoka 120a6e
  void setLabel(const TFilePath &fp);
Shinya Kitaoka 473e70
  void timerEvent(QTimerEvent *event) override;
Shinya Kitaoka 120a6e
  void push(const TFilePath &fp);
Shinya Kitaoka 120a6e
  void push(const TFilePathSet &fs);
Shinya Kitaoka 120a6e
  void pop();
Shinya Kitaoka 120a6e
  bool step();
Shinya Kitaoka 120a6e
  void clearStack();
Shinya Kitaoka 120a6e
  void onPlt(const TFilePath &fp);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
#endif  // PALETTESCANPOPUP_H