summaryrefslogtreecommitdiffstats
path: root/filewidget.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang warnings in FileWidgetArno2018-12-091-1/+1
| | | | | | use nullptr instead of 0, and add a static_cast to document that we don't need floating point. QVariant::toLongLong() doesn't work with 1234.1234.
* Give some indication that we're copyingArno2018-07-301-0/+2
| | | | | Add a new label to the statusBar: When it's green the FileCopier is idle, when working, show the count.
* Speed up file copyArno2018-06-131-6/+1
| | | | | | | | | | | | | | | | Hmm, as it turns out QFile does a much better, e.g. faster, job than my open-coded file copy with a progress dialog. I always wondered why it only did 150-170Mbit. I thought that it was just the calculation, but now I have 400 Mbit, and it still stalls at 150 Mbit. QFile::copy maxes out the line, so get rid of the ProgressDialog and show a status message instead. Copy can be canceled by the context menu, but FileCopier will always finish the current file, because I don't want to lock and unlock the CancelMutex during copy. Besides, QFile::copy doesn't admit that :)
* Implement a useful searchArno2018-02-011-0/+2
| | | | | | Display Title and Filename search as non-modal dialog, so one can compare Files and Database. For now only Title search is implemented. Filename search does nothing (yet).
* Improve FileCopierArno2018-02-011-1/+1
| | | | | | | | | | | | | | | | This endeavor started out quite innocently: fix the connect syntax in ProgressDialog, but it quickly became much more. Vom Höxchen aufs Stöxchen :) First I thought it would be nice to add a total count to the ProgressDialog. Then I realized that I had QElapsedTimer::restart() totally wrong. It returns the ms *since the last restart*! It doesn't reset to zero, so fix that. While testing that I noticed that the download speed was quite below average, so change the buffer size and only check if we were cancelled when the timer elapsed. But that wasn't it. Eventually I dug into my firewall rules and routings to get it right.
* Add action for searching the interwebs for filenameArno2018-01-281-0/+1
|
* New feature: Guess subjectArno2018-01-271-0/+4
| | | | | | | | | If a descript.ion file exists in the current directory of fileWidget, read the subjects into a QStringList to determine the usenet subject from within ShemovCleaner. No more tedious task switching to the usenet client, just trigger "Guess subject..." :)
* Refresh favorite dirs after configuringArno2018-01-191-1/+1
| | | | | Update favorite dirs when adding or removing favorite directories. Also try to keep the current selection.
* Implement filtering by MIME-TypeArno2018-01-041-2/+3
| | | | | | The MIME-type is a regular expression that can be configured. Show the configured types in a QComboBox with the special value "<all>" at the top, which invalidates the MIME type filter.
* Implement favorite dirsArno2018-01-041-0/+4
|
* Add cache operationsArno2018-01-041-0/+4
| | | | | | Implement functions to remove files from cached data, or clear it completely. This may be necessary if something happened without us knowing, e.g. a file was copied by another program.
* Export reading and writing cache into functionsArno2018-01-041-0/+2
| | | | No functional changes.
* Check Present attribute on cached dataArno2018-01-031-3/+1
| | | | | | | | | | | | | Well, we cannot cache the Present attribute, because it can change without our knowledge, when a movie file has been archived in the meantime. Leave it in CachedFileData for now, but check it when we found a cache entry. While working on this, I realized that the Origin attribute is pretty much useless, at least in its current form. countMd5() already checks the origin table, and everything else was guesswork on the filename. Also, it was an extra, quite expensive SQL-Query for every video file, so remove it.
* Sort size numerically, not alphabeticallyArno2018-01-021-1/+1
|
* Save CachedFileData to diskArno2018-01-021-1/+1
| | | | | | | | | Since we already have the data, save it to speed up the start. Surprisingly, the hardest part was to figure out how to use QStandardPaths to find a location where to save the file. I went with the semi-hardcoded path HomeLocation/.shemovcleaner, even though we're on windows.
* Implement cache for FileWidgetArno2018-01-021-0/+5
| | | | | | | | | | Some data-gathering is quite expensive and requires a QProcess, like getting the duration, so cache it in memory using QCache. Once the cache is filled, the UI is much snappier. This simplifies gatherData() a bit. It's still quite a long function, but now it doesn't create the QStandardItems any more. I moved it to a separate function.
* Removed QSignalMapper from filewidget.cppArno2017-12-211-2/+0
| | | | | | 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 QT for deleting directoriesArno2017-12-181-1/+0
| | | | | | 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.
* Add a summary to ProgressDialogArno2016-12-061-0/+1
| | | | | 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-1/+1
| | | | Elide the text if necessary. Only show the destination directory.
* Actually use Copy Files to...Arno2016-12-031-0/+9
| | | | | | | | | | | | 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-0/+4
| | | | Does nothing yet. There's no slot for the actions.
* Indicate copy status of fileArno2016-12-021-2/+2
| | | | | | 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-2/+2
|
* Add preview for videosArno2016-11-271-0/+2
| | | | | | 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 free space widget to status barArno2016-11-271-0/+3
| | | | Red is used, green is free, obviously...
* New feature: Add OriginArno2016-11-101-2/+7
| | | | | | | | | | | | 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.
* Always select and set current first rowArno2016-09-161-0/+1
|
* Implement Copy&Paste for FileWidgetArno2016-09-041-1/+5
| | | | While at it, do the context menu, too...
* Make QActions local to FileWidgetArno2016-09-041-10/+26
| | | | Introduce Globals singleton for global actions.
* Add ProgressBar to status barArno2016-09-041-0/+3
| | | | | | | | 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.
* Delete directories recursivelyArno2016-09-041-0/+2
|
* Add toolbar to FileWidgetArno2016-09-041-0/+3
|
* Add menuBar to FileWidgetArno2016-09-041-3/+10
|
* Implement delete filesArno2016-09-041-0/+1
|
* Move some code around: prep for actionsArno2016-09-041-1/+3
| | | | | | * rename itemDoubleClicked to itemSelected * turn cd and fileData into functions * Bugfix: actually exec() mQFiles when gathering data!
* Navigate by keyboardArno2016-09-041-0/+5
| | | | | | | * Enter -> itemDoubleClicked * CTRL-S -> filter * CTRL-D -> select directory * CTRL-F -> focus files
* Usability fixes for FileWidgetArno2016-09-041-5/+3
| | | | | | | * 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-3/+12
| | | | | | | | 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-1/+4
| | | | | 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-2/+3
| | | | | | | 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-3/+5
| | | | | | | | | | 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.
* FileWidget enhancementsArno2016-09-031-1/+9
| | | | | | | * 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/+37
It checks the DB for md5sums and colors the files accordingly. As I said: very basic!