1 // Object Viewer Qt - BNP Manager Plugin - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2011 Roland WINKLMEIER <roland.m.winklmeier@gmail.com>
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef BNP_MANAGER_WINDOW_H
18 #define BNP_MANAGER_WINDOW_H
21 //#include "ui_bnp_manager_window.h"
24 #include <QtGui/QMainWindow>
25 #include <QtGui/QLabel>
26 #include <QtGui/QUndoStack>
27 #include <QtGui/QTableWidget>
33 class CBnpDirTreeDialog
;
34 class BnpFileListDialog
;
38 * Main window class. Derived from QMainWindow and implements
39 * the basic layout like menue, toolbars and dialogs.
44 class BNPManagerWindow
: public QMainWindow
51 BNPManagerWindow(QWidget
*parent
= 0);
57 QUndoStack
*m_undoStack
;
63 * \return Filename string
68 * Open a file dialog to choose which file should be opened.
73 * Load a certain bnp file into the manager
75 * \return true if everything went well
77 bool loadFile(const QString fileName
);
80 * close an opened bnp file and reset all views
85 * Add files into an opened bnp file.
89 void addFiles( QStringList FileList
);
92 * Unpack the files marked in the filelist dialog into user defined
95 * \return true if everything went well
100 * Delete marked files from the bnp file
106 void dragEnterEvent (QDragEnterEvent
*event
);
107 void dropEvent(QDropEvent
*event
);
112 * Read plugin settings and set the window accordingly
117 * Write plugin settings
119 void writeSettings();
122 * Create all plugin dialogs
124 void createDialogs();
127 * Create all plugin actions
129 void createActions();
132 * Create the plugin toolbar
134 void createToolBars();
136 QToolBar
*m_fileToolBar
;
137 QToolBar
*m_toolsBar
;
139 QAction
*m_newAction
;
140 QAction
*m_openAction
;
141 QAction
*m_closeAction
;
142 QAction
*m_addFilesAction
;
143 QAction
*m_unpackFilesAction
;
144 QAction
*m_deleteFilesAction
;
146 CBnpDirTreeDialog
*m_BnpDirTreeDialog
;
147 BnpFileListDialog
*m_BnpFileListDialog
;
150 QString m_openedBNPFile
;
152 }; /* class BNPManagerWindow */
154 } /* namespace Plugin */