summaryrefslogtreecommitdiffstats
path: root/helper.h
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of HoverWindowArno2019-11-221-1/+1
| | | | | | | It depended on X11, because the hover center wasn't where it was supposed to be, so I worked around it with Xfixes.h, which unfortunately isn't even available in MSYS2. So another fix for compiling this under Windows.
* Use QMime* instead of libmagicArno2019-11-221-1/+0
| | | | | One more step to make it compile with Windows. And once again, it makes the code much neater and more readable.
* Fix helper warningsArno2018-11-231-3/+3
| | | | | | Sprinkle some static_casts here and there and fix auto conversions. Also introduce const ints for what to read for calculating the MD5-Sum of a file... Seems to work fine.
* Move fuzzyCheck to Helper namespaceArno2018-11-031-0/+1
|
* Add a menu with global actions to SmGlobalsArno2018-04-031-1/+1
| | | | | | | Use it in the toolbar for FSWidge and hide the menuBar. Change Helper::icon to accept different foreground colors and wether to draw the ellipse.
* Add context menu to FSWidgetArno2018-03-311-0/+1
| | | | Also create a helper function to create separator actions.
* Make FSWidget prettierArno2018-03-311-0/+1
| | | | | | * add programmatically rendered icons * make text Qt::black * set rootIsDecorated to false
* Play movies from USB if availableArno2016-03-051-0/+1
| | | | | If USB-Storage is mounted and available, search it for already archived movies. If found, play it.
* Fix convert to PNG messArno2015-10-241-1/+1
| | | | | | | | | | Automatically converting a damaged file to PNG and updating the archive is fine as long as we're *in* the archive, but it totally messes things up if we're browsing the file system. So check if the image is in the archive path, and only then consider auto-converting it. Also show a notice in the InfoItem if the file has been converted.
* Remove progress dialog and use Qt::WaitCursor insteadArno2015-08-051-0/+9
| | | | | | | | | Get rid of the progress Dialog in the filesystem widget and replace it with Qt::WaitCursor. While at it, show the waitcursor in the picture widget, too. Also remove the annoying warnings from ImageMagick by defining the missing constants.
* Automatically convert invalid jpg picsArno2015-07-181-0/+3
| | | | | | | | Well, seems that's Qt's ImageReader got pickier regarding jpeg-files. If the resulting QPixmap is null and void, try to convert them to png. This introduces a new dependency to ImageMagic++. I don't like it, but it works, kinda... I saw random crashes while testing...
* Get rid of Helper::centerDialogArno2015-06-061-1/+0
| | | | | | It's useless if you don't use a tiling window manager. Also, now we have an empty class SmDialog. Didn't replace it yet. Maybe it's useful in the future.
* Give Pictures some love!Arno2013-08-221-0/+1
| | | | | | * Show and archive size of pictures * Fix SqlQueries in PicFilesModel: removeFiles and changeMappings * use delegate in PictureView
* Implement previewArno2013-08-111-0/+2
| | | | Show 4 frames of the selected movie in PictureViewer2.
* Implement file properties dialogArno2013-07-281-0/+2
| | | | | | | | Show file properties in Filemanager and Archive, if the file is available. Also get rid of the palette stuff in SmGlobals. Just call setPalette() early enough and set it in SmTreeView.
* Read JSON from ffprobeArno2013-07-271-2/+1
| | | | | | | | | | | | | | | | Use JSON output from ffprobe instead of string parsing to get some kind of type safety. For doing that, some changes were needed in FileView: Use delegates for displaying Duration and Bitrate instead of mangling output in Qt::Displayrole. To reuse code, move all delegates from the new Archive to a separate file. And, of course, the initial objective: Show the accumulated size and duration of selected files in the status bar from the experimental archive.
* Make new archive workArno2013-07-081-0/+1
| | | | | | | | | | Well, this is a huge commit. Should be severals, but who knew... First and foremost feature: Make NewMovieWizard work with the experimental model. This change obsoleted a lot of code. Also, the old archive won't work with with the new Wizward... There are most probably many other features I forgot about.
* Lots of Display ChangesArno2013-07-061-0/+1
| | | | | | | | | * Save header states * Implement delegates for columns * unify size and duration to 1 column * colorize View ... and lots of other things I forgot :)
* Show duration in statusBarArno2013-03-221-0/+17
| | | | | Show total duration of selected Movies in FileView. Created a new class Helper::Duration for this and declared it as QMetaType.
* First shot at SmDirModelArno2013-03-161-0/+2
| | | | | | | | Gotta take a break here. Hopefully this will end up in a custom QFilesystemModel, but I'm hitting so many bugs on the way. Some things haven't worked for ages, I guess. Anyway, the watcher doesn't do anythying right now, still fixing bugs...
* Keep current Pic when adding files to PicViewer2Arno2012-10-191-8/+0
| | | | | | | Try to get the position of the current picture after adding and clearing the file list of PictureViewer2. While thinking of using std::find for this I realized that the operator()-functions in Helper:: weren't used any more, so remove them and the <algorithm> includes.
* Make NewPicsDialog archive picturesArno2012-02-251-1/+1
| | | | | | Finally NewPicsDialog actually does something. Added another parameter to Helper::moveToArchive. If set to true, files will only be copied instead of moved. Default is false, not changing the expected behavior.
* Center Dialogs on screenArno2011-08-171-0/+1
| | | | | | Since I'm now using a tiling window manager dialogs have to center themselves on the screen. Otherwise they end up at QPoint(0,0). Not very nice. Subclassed QDialog to SmDialog and converted all dialogs.
* Show metadata in ArchiveViewArno2011-02-201-0/+1
| | | | | Added a widget to display metadata beside actors and genres when available
* Finished metadataArno2011-01-271-0/+1
| | | | | Created a modes for metadata, revamped NewMovieWizard to use the model and created a MetadataWidget to edit and display metadata.
* Enhance filters in SeriesTreeWidget a little moreArno2010-12-301-0/+2
| | | | | | | | | | | Allow operators in filter. Operators are only valid if it's a NumericQuery. Operators are <>=. Also allow postfixes for numbers: k, m, g for kilobytes, megabytes and gigabytes. Also fix a little usability bug when filtering. If the result set was empty, the root item was collapsed. On the next search with a result, the root item was still collapsed. Since it wasn't shown there was no way to expand it.
* Cache for frame grabbingArno2010-12-161-1/+0
| | | | | | | | | Implemetented a cache for hovering over movies, saving the pictures from ffmpeg. For that SmGlobals got a new member *frameCache, handling all the dirty file access. I first tried to implement it as a helper, but that produced too much duplicate code.
* Implement hover over moviesArno2010-12-111-1/+3
| | | | | | | | | | | | | | | | | | | | What started as an attempt to show a frame from a movie when hovering over it, ended in a huge bugfix commit for hover related stuff. This commit is definitely not atomic. When hovering over a movie present on the filesytem a frame is shown. The time frame is configurable. While digging into the code I noticed some bugs. Bugfixes: * fix label for hove archive action. It was labeled for hovering over directories in FSWidget. * Hovering over directories didn't have an action. Also read the appropriate value from QSettings. Other: * add icons for hovering over directories and hovering over movies * replace SheMov::toggleHover(pics|some other) with a QSignalMapper
* Code cleanupArno2010-12-051-4/+0
| | | | | | Remove debug statements from FileSystemWidget. Also remove useless helper func StringListContains. That was a goodie. I guess I was quite drunk when I wrote that...
* Implement FilePropertiesDialogArno2010-07-311-0/+1
| | | | | | | | | | | Implemented a dialog for file properties. When the mime type says it's a video, fork ffprobe to read the properties of all streams and show them in a QTreeView powered by a SmTreeModel. If the mime type is image, use QImage to read some properties and show them in the same dialog. This commit introduces the new class FilePropertiesDialog. I also had to implement a copy constructor for SmTreeItem. It obsoletes classes ActorWidget, ActorModel and MoviePropertiesDialog.
* Implemented playing a movie on doubleclickArno2010-06-261-0/+4
| | | | | | | | | | | | | Movie files are played in the default player when double clicking on a movie, but not when doubleclicking on a series. The latter invokes the edit event on the series. Don't yet know if this is a good thing or not. Changes on the way there: 1. new helper function for finding the right player. Still need to fix FileSystemWidget to also use the Helper::function. It's a simple copy & paste from there. 2. added function SeriesTreeModel::findSortedMovies. It returns a QFileInfoList sorted by seriespart and fileno.
* Implemented PictureViewer classArno2010-05-241-0/+9
| | | | | | | Don't call an external program for showing a picture. When an image is doubleclicked a new windows shows the picture. Pictures can still be opened in an exteral program by using the "Open with..." context menu item.
* -Finished CoverArchiveEditor (finally, don't like that piece of code, too ↵am2009-07-221-1/+5
| | | | | | | | | | complicated) -It's now possible to manually add a movie w/o a file -Some usability fixes git-svn-id: file:///var/svn/repos2/shemov/trunk@394 f440f766-f032-0410-8965-dc7d17de2ca0
* -Made CoverItem behave consistentam2009-07-211-0/+3
| | | | | | | | | | -get QModelIndex from MovieModel by movieId -ArchiveView: added delegates for dvd and size, MovieItem now returns size as int -Finished EditArchiveItemDialog -Reverted covereditor, it became too convoluted git-svn-id: file:///var/svn/repos2/shemov/trunk@393 f440f766-f032-0410-8965-dc7d17de2ca0
* Huge changes:am2009-07-171-0/+1
| | | | | | | | | | | | | | -Created an application icon and one for archives -implemented database configuration dialog -implemented listeditor -implemented covereditor -implemented md5sum helper -implemented archivefilewidget -Debugging spree: fixed SQL-statements and ListModel git-svn-id: file:///var/svn/repos2/shemov/trunk@389 f440f766-f032-0410-8965-dc7d17de2ca0
* -added some artworkam2009-07-061-0/+20
-started implementing FilesystemView git-svn-id: file:///var/svn/repos2/shemov/trunk@377 f440f766-f032-0410-8965-dc7d17de2ca0