Linux multi-monitor fullscreen support
[ryzomcore.git] / studio / src / plugins / bnp_manager / bnp_manager_window.h
blob887394b00d02a0e02551f0dfc8ee9db2348f1efc
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>
3 //
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.
8 //
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
20 // Project includes
21 //#include "ui_bnp_manager_window.h"
23 // Qt includes
24 #include <QtGui/QMainWindow>
25 #include <QtGui/QLabel>
26 #include <QtGui/QUndoStack>
27 #include <QtGui/QTableWidget>
30 namespace BNPManager
33 class CBnpDirTreeDialog;
34 class BnpFileListDialog;
35 class BNPFileHandle;
37 /**
38 * Main window class. Derived from QMainWindow and implements
39 * the basic layout like menue, toolbars and dialogs.
41 * \date 2011
44 class BNPManagerWindow : public QMainWindow
46 Q_OBJECT
48 public:
50 // Constructor
51 BNPManagerWindow(QWidget *parent = 0);
53 //Destructor
54 ~BNPManagerWindow();
57 QUndoStack *m_undoStack;
59 public Q_SLOTS:
61 /**
62 * Create a new file
63 * \return Filename string
65 void newFile();
67 /**
68 * Open a file dialog to choose which file should be opened.
70 void open();
72 /**
73 * Load a certain bnp file into the manager
74 * \param Filename
75 * \return true if everything went well
77 bool loadFile(const QString fileName);
79 /**
80 * close an opened bnp file and reset all views
82 void close();
84 /**
85 * Add files into an opened bnp file.
86 * \param Filelist
88 void addFiles();
89 void addFiles( QStringList FileList );
91 /**
92 * Unpack the files marked in the filelist dialog into user defined
93 * directory.
94 * \param TBD
95 * \return true if everything went well
97 void unpackFiles();
99 /**
100 * Delete marked files from the bnp file
101 * \param TBD
103 void deleteFiles();
105 protected:
106 void dragEnterEvent (QDragEnterEvent *event);
107 void dropEvent(QDropEvent *event);
109 private:
112 * Read plugin settings and set the window accordingly
114 void readSettings();
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;
149 QString m_DataPath;
150 QString m_openedBNPFile;
152 }; /* class BNPManagerWindow */
154 } /* namespace Plugin */
156 #endif