Pencil2D Animation
Download Community News Docs Contribute
  • Overview
  • Articles
  • Code
  •  
  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • File List
Loading...
Searching...
No Matches
  • app
  • src
importexportdialog.h
1/*
2
3Pencil2D - Traditional Animation Software
4Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5Copyright (C) 2012-2020 Matthew Chiawen Chang
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation; version 2 of the License.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16*/
17
18#ifndef IMPORTEXPORTDIALOG_H
19#define IMPORTEXPORTDIALOG_H
20
21#include <QDialog>
22#include <QGroupBox>
23#include "filetype.h"
24
25namespace Ui {
26class ImportExportDialog;
27}
28
29class QDialogButtonBox;
30
31class ImportExportDialog : public QDialog
32{
33 Q_OBJECT
34
35public:
36 enum Mode { Import, Export };
37
38 explicit ImportExportDialog(QWidget* parent, Mode eMode, FileType eFileType);
39 ~ImportExportDialog() override;
40
41 void init();
42 QString getFilePath() const;
43 QString getAbsolutePath();
44 QStringList getFilePaths();
45 int getPosIndex() { return mPosIndex; }
46
47signals:
48 void filePathsChanged(QStringList filePaths);
49
50protected:
51 QGroupBox* getOptionsGroupBox();
52 QGroupBox* getPreviewGroupBox();
53 QDialogButtonBox* getDialogButtonBox();
54
55 void setFileExtension(const QString& extension);
56 void hideOptionsGroupBox(bool hide);
57 void hidePreviewGroupBox(bool hide);
58 void hideInstructionsLabel(bool hide);
59
60 void setInstructionsLabel(const QString& text);
61 void setOkButtonEnabled(bool enabled);
62
63private slots:
64 void browse();
65 void setPosIndex(int index) { mPosIndex = index; }
66
67private:
68 Ui::ImportExportDialog* ui = nullptr;
69
70 QStringList m_filePaths;
71
72 FileType mFileType = FileType::ANIMATION;
73 Mode mMode = Import;
74 int mPosIndex = 0;
75};
76
77#endif // IMPORTEXPORTDIALOG_H
ImportExportDialog
Definition: importexportdialog.h:32
QDialog::extension
QWidget * extension() const const
QDialog
QDialogButtonBox
QGroupBox
QObject::Q_OBJECT
Q_OBJECTQ_OBJECT
QObject::parent
QObject * parent() const const
QString
QStringList
QWidget
QWidget::enabled
enabled
QWidget::hide
void hide()
Generated on Thu May 8 2025 04:47:53 for Pencil2D by doxygen 1.9.6 based on revision 4513250b1d5b1a3676ec0e67b06b7a885ceaae39