summaryrefslogtreecommitdiffstats
path: root/filewidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Try harder to delete a fileArno2018-01-021-1/+5
| | | | | | QFile::remove() fails when the read-only attribute is set. Turn out it can be unset with QFile::setPermissions(QFile::ReadOther | QFile::WriteOther). Try it when the initial call to remove() failed.
* Removed QSignalMapper from filewidget.cppArno2017-12-211-10/+3
| | | | | | Since the advent of lambdas as SLOTS the signal mapper is indeed useless und overly complicated. Remove it due to a deprecation warning from the compiler.
* Use QDirIterator in FileWidgetArno2017-12-191-18/+17
| | | | | | | | According to the documentation it should be faster, but it also has its drawbacks. We can't use the progressbar any more, because we don't know how many files we're going to get. Show the number of files in the statusMessage instead, and show the total size of analyzed files in GB when we're done.
* Improve FileWidgetArno2017-12-191-0/+6
| | | | | Also keep sort order and column while gathering data. Disable sorting while populating the model.
* Use QT for deleting directoriesArno2017-12-181-25/+17
| | | | | | QDir has a function removeRecursively(). Use that instead of a homebrew implementation. Don't gatherData() after that, just remove the deleted items from the view.
* Do not try to copy directoriesArno2016-12-061-1/+1
| | | | | We don't have support for recursive copies, and I'm not really sure if we need it, so don't do it for now.
* Add a summary to ProgressDialogArno2016-12-061-0/+8
| | | | | Show how many files we have, and display the transfer rate in Megabytes per second. Can't believe that it worked right from the start :)
* Add destination to ProgressDialogArno2016-12-061-4/+6
| | | | Elide the text if necessary. Only show the destination directory.
* Prettify ProgressDialogArno2016-12-061-1/+2
| | | | | Make it fixed width, show only the filename from the source instead of the full path and elide text if necessary.
* Actually use Copy Files to...Arno2016-12-031-1/+67
| | | | | | | | | | | | Create a FileCopier and show a custom, non-modal progress dialog when we're copying files. Turns out that a QProgressDialog always shows when it's created. This is by design, so I had to implement one that fits my needs. Also, a buffer size of 32K (as used in MKVMerger) is way too small to max out the available bandwidth, so I set it to an (arbitrary) value of 16MB.
* Add Copy Files to... context menuArno2016-12-021-1/+21
| | | | Does nothing yet. There's no slot for the actions.
* Emit freeSpaceChanged in gatherData()Arno2016-12-021-3/+1
| | | | ...instead of the calling functions to make it more consistent.
* Indicate copy status of fileArno2016-12-021-1/+20
| | | | | | Add a new column to FileWidget to indicate the copy status: Use the gender sign for male (blue) to indicate that the file was found and the sign for female (red) that it was not.
* Add file size to FileWidgetArno2016-11-271-1/+12
|
* Add preview for videosArno2016-11-271-1/+24
| | | | | | Grab 4 frames from a video and display them in the Viewer. First frame is @00:01:00, last at length - 1 minute, and the other two are in between: length / 4 * 2 and 3 (hardcoded).
* Add picture viewerArno2016-11-271-0/+6
| | | | Opens on doubleclick when it's image/*.
* Add free space widget to status barArno2016-11-271-1/+3
| | | | Red is used, green is free, obviously...
* New feature: Add OriginArno2016-11-101-4/+41
| | | | | | | | | | | | Since SheMov now displays origin files (i.e. source files for a reencode), add an option here to add origin files for already archived movies. We guess the archived movie from the filename by cutting off the extension and look it up in the files table. If we find an archived movie with that filename, mark the source blue. Deactive "Add" if we don't find one or if we already have an origin.
* Resort context menu for FileWidgetArno2016-11-051-1/+1
| | | | Put Back and Up actions on top so we feel like a web browser.
* Always select and set current first rowArno2016-09-161-1/+9
|
* Remove GroupBoxes from FileWidgetArno2016-09-051-23/+26
| | | | | | | | | | | | | Sigh... Well, nothing is as easy as it seems. After removing the GroupBoxes from FileWidget because they took too much real estate, I realized that returnPressed() did not work with the QLineEdits. That happened because I set the shortcut for properties() to Qt::Key_Enter. Never, ever do that! It completely messes up keyboard navigation! Use CTRL+Enter instead and restore keyPressEvent() for Qt::Key_Enter. If it's a directory, cd into it, otherwise try properties().
* Remove redundant keyPressEventsArno2016-09-051-15/+0
| | | | | Since the actions have shortcuts now, some keyPressEvents are not needed any more.
* Usability fixes for FileDisplayArno2016-09-051-1/+1
| | | | | | * save and restore size * actually restore header data * add Properties... to context menu
* Implement Copy&Paste for FileWidgetArno2016-09-041-2/+65
| | | | While at it, do the context menu, too...
* Make QActions local to FileWidgetArno2016-09-041-0/+83
| | | | Introduce Globals singleton for global actions.
* Add ProgressBar to status barArno2016-09-041-2/+9
| | | | | | | | Indicate progress of gathering data in status bar Also (yes, I know, should be a separate commit) fix keyboard navigation by getting rid of ShemovCleaner::keyPressEvent and replace it with buddies in QTabWidget.
* Make Backspace a shortcut for cdUp()Arno2016-09-041-0/+4
|
* Delete directories recursivelyArno2016-09-041-2/+23
|
* Add toolbar to FileWidgetArno2016-09-041-0/+3
|
* Add menuBar to FileWidgetArno2016-09-041-7/+38
|
* Implement delete filesArno2016-09-041-8/+25
|
* Move some code around: prep for actionsArno2016-09-041-19/+29
| | | | | | * rename itemDoubleClicked to itemSelected * turn cd and fileData into functions * Bugfix: actually exec() mQFiles when gathering data!
* Navigate by keyboardArno2016-09-041-1/+32
| | | | | | | * Enter -> itemDoubleClicked * CTRL-S -> filter * CTRL-D -> select directory * CTRL-F -> focus files
* Usability fixes for FileWidgetArno2016-09-041-42/+44
| | | | | | | * Use GroupBoxes * Don't clear filevew if browing is cancelled * processEvents() when gathering data * filter the view instead of selecting items when searching/filtering
* Display duration and num. of selected FilesArno2016-09-041-1/+33
| | | | | | | | When selecting files in FileWidget, calculate the total duration and display it in the status bar. Also count the selected Files and show them. Update status bar on changing tabs.
* Add FileDisplayArno2016-09-031-5/+17
| | | | | When doubleclicking on a file already present in DB show a dialog with the series name, actors and genres.
* Implement doubleClicked in FileWidgetArno2016-09-031-16/+30
| | | | | | | Navigate through the filesystem by doubleclicking directories. Rename enums from Row to Column, since it *are* columns. I'm not very good at naming things...
* Fix Video sortingArno2016-09-031-22/+40
| | | | | | | | | | Show directories in FileWidget and always put ".." first, then the directories by creating a new QSortFilterProxyModel. For this the file attribute is needed for every column, so use QList<QStandardItem*> instead of individual QStandardItem*s. Use enums to access columns.
* Make FileWidget searchableArno2016-09-031-1/+19
|
* FileWidget enhancementsArno2016-09-031-9/+48
| | | | | | | * add distinct icons for files presenet or non present in DB and non- video files, make it sortable * read and save settings * save geometry of ShemovCleaner
* Basic Version of FileWidgetArno2016-09-021-0/+147
It checks the DB for md5sums and colors the files accordingly. As I said: very basic!