Skip to content

An OpenMW mod that lets you play the whole Elder Scrolls III: Morrowind as a top-down isometric game — with full online co-op or MMO modes.

C++
1.0 KB
Raw Blame
#ifndef CSV_WORLD_DRAGDROPUTILS_HPP
#define CSV_WORLD_DRAGDROPUTILS_HPP

#include "../../model/world/columnbase.hpp"

class QDropEvent;

namespace CSMWorld
{
    class TableMimeData;
    class UniversalId;
}

namespace CSVWorld
{
    namespace DragDropUtils
    {
        const CSMWorld::TableMimeData* getTableMimeData(const QDropEvent& event);

        bool canAcceptData(const QDropEvent& event, CSMWorld::ColumnBase::Display type);
        ///< Checks whether the \a event contains a valid CSMWorld::TableMimeData that holds the \a type

        bool isTopicOrJournal(const QDropEvent& event, CSMWorld::ColumnBase::Display type);

        bool isInfo(const QDropEvent& event, CSMWorld::ColumnBase::Display type);
        ///< Info types can be dragged to sort the info table

        CSMWorld::UniversalId getAcceptedData(const QDropEvent& event, CSMWorld::ColumnBase::Display type);
        ///< Gets the accepted data from the \a event using the \a type
        ///< \return Type_None if the \a event data doesn't holds the \a type
    }
}

#endif