diff options
author | Ken Moore <ken@pcbsd.org> | 2015-02-24 12:32:00 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-02-24 12:32:00 -0500 |
commit | bece1d27f3a650683aa1ee5efe27c0797193a19f (patch) | |
tree | 6df66a92a79d89b5983feca0f02888b0bf33d0d1 /lumina-fm/MainUI.cpp | |
parent | Finish up some little things in lumina-xconfig, and add it to the build/port. (diff) | |
download | lumina-bece1d27f3a650683aa1ee5efe27c0797193a19f.tar.gz lumina-bece1d27f3a650683aa1ee5efe27c0797193a19f.tar.bz2 lumina-bece1d27f3a650683aa1ee5efe27c0797193a19f.zip |
Subclass the main QFileSystemModel to provide drag and drop support. This still appears to be able to "drop" items outside the window (for other applications) and has strange behavior in those cases (although non-critical - it does not change the filesystem in any way).
Diffstat (limited to 'lumina-fm/MainUI.cpp')
-rw-r--r-- | lumina-fm/MainUI.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index e2d0cbd2..fe3240dc 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -44,8 +44,10 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ worker = new BackgroundWorker; worker->moveToThread(workThread); if(DEBUG){ qDebug() << " - File System Model"; } - fsmod = new QFileSystemModel(this); + fsmod = new DDFileSystemModel(this); fsmod->setRootPath("/"); + //fsmod->setReadOnly(false); //required for DnD, but also enables a lot of other stuff + //qDebug() << "DnD options:" << fsmod->supportedDropActions(); ui->tree_dir_view->setModel(fsmod); ui->tree_dir_view->sortByColumn(0, Qt::AscendingOrder); ui->tree_dir_view->setColumnWidth(0,200); |