OpenMW
apps/opencs/view/world/tablebottombox.hpp
Go to the documentation of this file.
00001 #ifndef CSV_WORLD_BOTTOMBOX_H
00002 #define CSV_WORLD_BOTTOMBOX_H
00003 
00004 #include <QWidget>
00005 
00006 class QLabel;
00007 class QStackedLayout;
00008 class QStatusBar;
00009 class QUndoStack;
00010 
00011 namespace CSMWorld
00012 {
00013     class Data;
00014     class UniversalId;
00015 }
00016 
00017 namespace CSVWorld
00018 {
00019     class CreatorFactoryBase;
00020     class Creator;
00021 
00022     class TableBottomBox : public QWidget
00023     {
00024             Q_OBJECT
00025 
00026             bool mShowStatusBar;
00027             QLabel *mStatus;
00028             QStatusBar *mStatusBar;
00029             int mStatusCount[4];
00030             Creator *mCreator;
00031             bool mCreating;
00032             QStackedLayout *mLayout;
00033 
00034         private:
00035 
00036             // not implemented
00037             TableBottomBox (const TableBottomBox&);
00038             TableBottomBox& operator= (const TableBottomBox&);
00039 
00040             void updateStatus();
00041 
00042         public:
00043 
00044             TableBottomBox (const CreatorFactoryBase& creatorFactory, CSMWorld::Data& data,
00045                 QUndoStack& undoStack, const CSMWorld::UniversalId& id, QWidget *parent = 0);
00046 
00047             virtual ~TableBottomBox();
00048 
00049             void setEditLock (bool locked);
00050 
00051             void setStatusBar (bool show);
00052 
00053             bool canCreateAndDelete() const;
00057 
00058         signals:
00059 
00060             void requestFocus (const std::string& id);
00063 
00064         private slots:
00065 
00066             void createRequestDone();
00068 
00069         public slots:
00070 
00071             void selectionSizeChanged (int size);
00072 
00073             void tableSizeChanged (int size, int deleted, int modified);
00077 
00078             void createRequest();
00079     };
00080 }
00081 
00082 #endif