Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

ModuleAllocPage_wdgt.h

00001 /***************************************************************************
00002  *   Copyright (C) 2006 by Graeme Foster                                   *
00003  *   email    foster.graeme@gmail.com                                      *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #ifndef __MODULE_ALLOC_PAGE_WDGT_H
00022 #define __MODULE_ALLOC_PAGE_WDGT_H
00023 
00024 #include <QtGui>
00025 #include "dbListManager.h"
00026 
00027 #include "ui_ModuleAllocPage_wdgt.h"
00028 
00029 #include "InstItem.h"
00030 #include "StaffModel.h"
00031 #include "ModuleModel.h"
00032 #include "MLAllocModel.h"
00033 
00034 class ControlPanel;
00035 
00036 class ModuleAllocPageWidget : public QWidget
00037 {
00038     Q_OBJECT
00039 
00040 public: // methods
00041         ModuleAllocPageWidget(ControlPanel * mainWindow
00042                              ,QWidget * widgetParent
00043                              ,QBoxLayout * layoutParent
00044                              ,dbListManager * dataLists);
00045 protected: // Properties
00046         QVBoxLayout * vboxLayout;
00047         Ui::ModuleAllocPage_wdgt wdgt;
00048         ControlPanel  * pMainWindow;
00049         dbListManager * pDataLists;
00050         
00051         ModuleItem  * selectedModule;
00052         StaffItem   * selectedStaff;
00053         MLAllocItem * SelectedAllocation;
00054         
00055 private: // Methods
00056         void createActions();
00057         
00058         void initrzlModOdd(Programme * progObj);
00059         void initrzlModEven(Programme * progObj);
00060         void initrztDeptStaff(Department * deptObj);
00061         void initrztInstStaff(Institute * instObj);
00062         void inittrvAlloc(Programme * progObj);
00063         
00064         void hideModuleRow(Module * mod);
00065         void showModuleRow(Module * mod);
00066         inline int getModuleRow(Module * mod, ModuleModel * model){return model->findModule(mod);}
00067 
00068 private slots:
00069         void cbxInstSelected(QString name);
00070         void cbxProgSelected(QString name);
00071         void cbxDeptSelected(QString name);
00072         
00073         void itemModuleSelected(const QModelIndex & index);
00074         void itemLecturerSelected(const QModelIndex & index);
00075         void itemAllocSelected(const QModelIndex & index);
00076         
00077         void btnAddAllocation();
00078         void btnDelAllocation();
00079 };
00080 
00081 #endif

Generated on Thu Apr 6 16:27:17 2006 for time-table by  doxygen 1.4.4