VR-Forces 4.0.4 Class Documentation
include/vrfGuiCoreQt/objectMapListView.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2006 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: objectMapListView.h,v $ $Revision: 1.2 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #pragma once
00013 
00014 #include <vrfGuiCoreQt/vrfGuiCoreQt.h>
00015 
00016 #include <vrfutil/objMapEntry.h>
00017 
00018 #include <QtGui/QTreeWidget>
00019 
00020 class DtAddressMap;
00021 class DtList;
00022 class DtSimulationAddress;
00023 
00024 namespace makVrf
00025 {
00026    class DT_DLL_VRFGUICOREQT DtObjectMapListView : public QTreeWidget
00027    {
00028       Q_OBJECT
00029 
00030    public:
00031       DtObjectMapListView(QWidget* parent);
00032       virtual ~DtObjectMapListView();
00033 
00034       virtual bool init(DtAddressMap* map, const DtList* backends);
00035       virtual void modifyAddressMap();
00036 
00037       virtual void setDragDropEnabled(bool);
00038 
00039       virtual bool canPaste();
00040       virtual bool canCut();
00041 
00043       virtual bool allObjectsAssigned() const;
00044 
00045    public slots:
00046       virtual void cut();
00047       virtual void paste();
00048 
00049    public slots:
00050       virtual void backendAdded(const DtSimulationAddress&);
00051       virtual void backendRemoved(const DtSimulationAddress&);
00052 
00053    protected slots:
00054       virtual void backEndSelectionChanged();
00055 
00056    signals:
00057       void pasteEnabled();
00058       void mappingChanged();
00059       void pasted();
00060 
00061    protected:
00062       virtual QMimeData* mimeData(const QList<QTreeWidgetItem*> list) const;
00063       virtual void dragEnterEvent(QDragEnterEvent* event);
00064       virtual void dragMoveEvent(QDragMoveEvent* event);
00065       virtual bool dropMimeData(QTreeWidgetItem* parent, int index, const QMimeData* mimeData, Qt::DropAction action);
00066 
00067       virtual void seedObjects(DtAddressMap* map);
00068       virtual void initConnections();
00069       virtual bool isMappedBackend(const DtSimulationAddress&);
00070 
00071       virtual QTreeWidgetItem* selectedServer();
00072       virtual void paste(const QString& listViewItems, QTreeWidgetItem* lvi);
00073       virtual void drawRow(QPainter * painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
00074 
00075    protected:
00076       QHash<QString, QTreeWidgetItem*> myBackEnds;
00077       bool myDragDropEnabled;
00078       mutable QList<QTreeWidgetItem*> myDragging;
00079    };
00080 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)