//Auto-generated by kalyptus. DO NOT EDIT.
namespace Kimono {
    using System;
    using Qyoto;
    using System.Collections.Generic;
    /// <remarks>
    ///  KDirModel implements the QAbstractItemModel interface (for use with Qt's model/view widgets)
    ///  around the directory listing for one directory or a tree of directories.
    ///  See <see cref="IKDirModelSignals"></see> for signals emitted by KDirModel
    /// </remarks>        <author> David Faure
    ///  Based on work by Hamish Rodda and Pascal Letourneau
    ///  </author>
    ///         <short> A model for a KIO-based directory tree. </short>
    ///         <see> KDirSortFilterProxyModel</see>
    [SmokeClass("KDirModel")]
    public class KDirModel : QAbstractItemModel, IDisposable {
        protected KDirModel(Type dummy) : base((Type) null) {}
        protected new void CreateProxy() {
            interceptor = new SmokeInvocation(typeof(KDirModel), this);
        }
        /// <remarks>
        ///  Useful "default" columns. Views can use a proxy to have more control over this.
        ///      </remarks>        <short>     Useful "default" columns.</short>
        public enum ModelColumns {
            Name = 0,
            Size = 1,
            ModifiedTime = 2,
            Permissions = 3,
            Owner = 4,
            Group = 5,
            Type = 6,
            ColumnCount = 7,
        }
        public enum AdditionalRoles {
            FileItemRole = 0x07A263FF,
            ChildCountRole = 0x2C4D0A40,
        }
        public enum DropsAllowedFlag {
            NoDrops = 0,
            DropOnDirectory = 1,
            DropOnAnyFile = 2,
            DropOnLocalExecutable = 4,
        }
        public const int ChildCountUnknown = -1;
        /// <remarks>
        /// <param> name="parent" parent qobject
        ///      </param></remarks>        <short>   </short>
        public KDirModel(QObject parent) : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("KDirModel#", "KDirModel(QObject*)", typeof(void), typeof(QObject), parent);
        }
        public KDirModel() : this((Type) null) {
            CreateProxy();
            interceptor.Invoke("KDirModel", "KDirModel()", typeof(void));
        }
        /// <remarks>
        ///  Set the directory lister to use by this model, instead of the default KDirLister created internally.
        ///  The model takes ownership.
        ///      </remarks>        <short>    Set the directory lister to use by this model, instead of the default KDirLister created internally.</short>
        public void SetDirLister(KDirLister dirLister) {
            interceptor.Invoke("setDirLister#", "setDirLister(KDirLister*)", typeof(void), typeof(KDirLister), dirLister);
        }
        /// <remarks>
        ///  Return the directory lister used by this model.
        ///      </remarks>        <short>    Return the directory lister used by this model.</short>
        public KDirLister DirLister() {
            return (KDirLister) interceptor.Invoke("dirLister", "dirLister() const", typeof(KDirLister));
        }
        /// <remarks>
        ///  Return the fileitem for a given index. This is O(1), i.e. fast.
        ///      </remarks>        <short>    Return the fileitem for a given index.</short>
        public KFileItem ItemForIndex(QModelIndex index) {
            return (KFileItem) interceptor.Invoke("itemForIndex#", "itemForIndex(const QModelIndex&) const", typeof(KFileItem), typeof(QModelIndex), index);
        }
        /// <remarks>
        ///  Return the index for a given kfileitem. This can be slow.
        ///      </remarks>        <short>    Return the index for a given kfileitem.</short>
        public QModelIndex IndexForItem(KFileItem arg1) {
            return (QModelIndex) interceptor.Invoke("indexForItem#", "indexForItem(const KFileItem&) const", typeof(QModelIndex), typeof(KFileItem), arg1);
        }
        /// <remarks>
        ///  Return the index for a given url. This can be slow.
        ///      </remarks>        <short>    Return the index for a given url.</short>
        public QModelIndex IndexForUrl(KUrl url) {
            return (QModelIndex) interceptor.Invoke("indexForUrl#", "indexForUrl(const KUrl&) const", typeof(QModelIndex), typeof(KUrl), url);
        }
        /// <remarks>
        ///  When the model is used by a treeview, call KDirLister.OpenUrl with the base url of the tree,
        ///  then the treeview will take care of calling fetchMore() when the user opens directories.
        ///  However if you want the tree to show a given URL (i.e. open the tree recursively until that URL),
        ///  call expandToUrl().
        ///  Note that this is asynchronous; the necessary listing of subdirectories will take time so
        ///  the model will not immediately have this url available.
        ///  The model emits the signal expand() when an index has become available; this can be connected
        ///  to the treeview in order to let it open that index.
        /// <param> name="url" the url of a subdirectory of the directory model
        ///      </param></remarks>        <short> Lists subdirectories using fetchMore() as needed until the given <code>url</code> exists in the model. </short>
        public void ExpandToUrl(KUrl url) {
            interceptor.Invoke("expandToUrl#", "expandToUrl(const KUrl&)", typeof(void), typeof(KUrl), url);
        }
        /// <remarks>
        ///  Notify the model that the item at this index has changed.
        ///  For instance because KMimeTypeResolver called determineMimeType on it.
        ///  This makes the model emit its dataChanged signal at this index, so that views repaint.
        ///  Note that for most things (renaming, changing size etc.), KDirLister's signals tell the model already.
        ///      </remarks>        <short>    Notify the model that the item at this index has changed.</short>
        public void ItemChanged(QModelIndex index) {
            interceptor.Invoke("itemChanged#", "itemChanged(const QModelIndex&)", typeof(void), typeof(QModelIndex), index);
        }
        public void SetDropsAllowed(uint dropsAllowed) {
            interceptor.Invoke("setDropsAllowed$", "setDropsAllowed(KDirModel::DropsAllowed)", typeof(void), typeof(uint), dropsAllowed);
        }
        [SmokeMethod("canFetchMore(const QModelIndex&) const")]
        public override bool CanFetchMore(QModelIndex parent) {
            return (bool) interceptor.Invoke("canFetchMore#", "canFetchMore(const QModelIndex&) const", typeof(bool), typeof(QModelIndex), parent);
        }
        [SmokeMethod("columnCount(const QModelIndex&) const")]
        public override int ColumnCount(QModelIndex parent) {
            return (int) interceptor.Invoke("columnCount#", "columnCount(const QModelIndex&) const", typeof(int), typeof(QModelIndex), parent);
        }
        [SmokeMethod("columnCount() const")]
        public virtual int ColumnCount() {
            return (int) interceptor.Invoke("columnCount", "columnCount() const", typeof(int));
        }
        [SmokeMethod("data(const QModelIndex&, int) const")]
        public override QVariant Data(QModelIndex index, int role) {
            return (QVariant) interceptor.Invoke("data#$", "data(const QModelIndex&, int) const", typeof(QVariant), typeof(QModelIndex), index, typeof(int), role);
        }
        [SmokeMethod("data(const QModelIndex&) const")]
        public virtual QVariant Data(QModelIndex index) {
            return (QVariant) interceptor.Invoke("data#", "data(const QModelIndex&) const", typeof(QVariant), typeof(QModelIndex), index);
        }
        [SmokeMethod("dropMimeData(const QMimeData*, Qt::DropAction, int, int, const QModelIndex&)")]
        public override bool DropMimeData(QMimeData data, Qt.DropAction action, int row, int column, QModelIndex parent) {
            return (bool) interceptor.Invoke("dropMimeData#$$$#", "dropMimeData(const QMimeData*, Qt::DropAction, int, int, const QModelIndex&)", typeof(bool), typeof(QMimeData), data, typeof(Qt.DropAction), action, typeof(int), row, typeof(int), column, typeof(QModelIndex), parent);
        }
        [SmokeMethod("fetchMore(const QModelIndex&)")]
        public override void FetchMore(QModelIndex parent) {
            interceptor.Invoke("fetchMore#", "fetchMore(const QModelIndex&)", typeof(void), typeof(QModelIndex), parent);
        }
        [SmokeMethod("flags(const QModelIndex&) const")]
        public override uint Flags(QModelIndex index) {
            return (uint) interceptor.Invoke("flags#", "flags(const QModelIndex&) const", typeof(uint), typeof(QModelIndex), index);
        }
        [SmokeMethod("hasChildren(const QModelIndex&) const")]
        public override bool HasChildren(QModelIndex parent) {
            return (bool) interceptor.Invoke("hasChildren#", "hasChildren(const QModelIndex&) const", typeof(bool), typeof(QModelIndex), parent);
        }
        [SmokeMethod("hasChildren() const")]
        public override bool HasChildren() {
            return (bool) interceptor.Invoke("hasChildren", "hasChildren() const", typeof(bool));
        }
        [SmokeMethod("headerData(int, Qt::Orientation, int) const")]
        public override QVariant HeaderData(int section, Qt.Orientation orientation, int role) {
            return (QVariant) interceptor.Invoke("headerData$$$", "headerData(int, Qt::Orientation, int) const", typeof(QVariant), typeof(int), section, typeof(Qt.Orientation), orientation, typeof(int), role);
        }
        [SmokeMethod("headerData(int, Qt::Orientation) const")]
        public override QVariant HeaderData(int section, Qt.Orientation orientation) {
            return (QVariant) interceptor.Invoke("headerData$$", "headerData(int, Qt::Orientation) const", typeof(QVariant), typeof(int), section, typeof(Qt.Orientation), orientation);
        }
        [SmokeMethod("index(int, int, const QModelIndex&) const")]
        public override QModelIndex Index(int row, int column, QModelIndex parent) {
            return (QModelIndex) interceptor.Invoke("index$$#", "index(int, int, const QModelIndex&) const", typeof(QModelIndex), typeof(int), row, typeof(int), column, typeof(QModelIndex), parent);
        }
        [SmokeMethod("index(int, int) const")]
        public virtual QModelIndex Index(int row, int column) {
            return (QModelIndex) interceptor.Invoke("index$$", "index(int, int) const", typeof(QModelIndex), typeof(int), row, typeof(int), column);
        }
        [SmokeMethod("mimeData(const QList<QModelIndex>&) const")]
        public override QMimeData MimeData(List<QModelIndex> indexes) {
            return (QMimeData) interceptor.Invoke("mimeData?", "mimeData(const QList<QModelIndex>&) const", typeof(QMimeData), typeof(List<QModelIndex>), indexes);
        }
        [SmokeMethod("mimeTypes() const")]
        public override List<string> MimeTypes() {
            return (List<string>) interceptor.Invoke("mimeTypes", "mimeTypes() const", typeof(List<string>));
        }
        [SmokeMethod("parent(const QModelIndex&) const")]
        public override QModelIndex Parent(QModelIndex index) {
            return (QModelIndex) interceptor.Invoke("parent#", "parent(const QModelIndex&) const", typeof(QModelIndex), typeof(QModelIndex), index);
        }
        [SmokeMethod("rowCount(const QModelIndex&) const")]
        public override int RowCount(QModelIndex parent) {
            return (int) interceptor.Invoke("rowCount#", "rowCount(const QModelIndex&) const", typeof(int), typeof(QModelIndex), parent);
        }
        [SmokeMethod("rowCount() const")]
        public virtual int RowCount() {
            return (int) interceptor.Invoke("rowCount", "rowCount() const", typeof(int));
        }
        [SmokeMethod("setData(const QModelIndex&, const QVariant&, int)")]
        public override bool SetData(QModelIndex index, QVariant value, int role) {
            return (bool) interceptor.Invoke("setData##$", "setData(const QModelIndex&, const QVariant&, int)", typeof(bool), typeof(QModelIndex), index, typeof(QVariant), value, typeof(int), role);
        }
        [SmokeMethod("setData(const QModelIndex&, const QVariant&)")]
        public override bool SetData(QModelIndex index, QVariant value) {
            return (bool) interceptor.Invoke("setData##", "setData(const QModelIndex&, const QVariant&)", typeof(bool), typeof(QModelIndex), index, typeof(QVariant), value);
        }
        [SmokeMethod("sort(int, Qt::SortOrder)")]
        public override void Sort(int column, Qt.SortOrder order) {
            interceptor.Invoke("sort$$", "sort(int, Qt::SortOrder)", typeof(void), typeof(int), column, typeof(Qt.SortOrder), order);
        }
        [SmokeMethod("sort(int)")]
        public override void Sort(int column) {
            interceptor.Invoke("sort$", "sort(int)", typeof(void), typeof(int), column);
        }
        ~KDirModel() {
            interceptor.Invoke("~KDirModel", "~KDirModel()", typeof(void));
        }
        public new void Dispose() {
            interceptor.Invoke("~KDirModel", "~KDirModel()", typeof(void));
        }
        protected new IKDirModelSignals Emit {
            get { return (IKDirModelSignals) Q_EMIT; }
        }
    }

    public interface IKDirModelSignals : IQAbstractItemModelSignals {
        /// <remarks>
        ///  Emitted for each subdirectory that is a parent of a url passed to expandToUrl
        ///  This allows to asynchronously open a tree view down to a given directory.
        ///      </remarks>        <short>    Emitted for each subdirectory that is a parent of a url passed to expandToUrl  This allows to asynchronously open a tree view down to a given directory.</short>
        [Q_SIGNAL("void expand(QModelIndex)")]
        void Expand(QModelIndex index);
    }
}
