summaryrefslogtreecommitdiffstats
path: root/filestreewidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of old archiveArno2013-07-271-611/+0
| | | | Yeah, finally it's gone! Lot's of useless, unneeded code vanished :)
* Fix window titleArno2013-07-271-10/+10
| | | | Set the main window title according to selected tab.
* Fix setAlternatignRowColorsArno2013-04-101-13/+14
| | | | | | | | | | | | | | | | | | | | Well, what started as a try to simplify QTreeView ended in a mass header murder... What happened: * I searched for a way to let every QTreeView honor the setAlternatingRowcolors() setting. Unfortunately it isn't enough to just set the global palette and set it to true. So every QTreeView is now derived from SmTreeView * SmTreeView registers itself with SmGlobals, so the property is set _after_ it's constructed. It's definitely not enough to call it in the constructor. I guess that's a bug. But it's enough to append the SmTreeView to a QList<QWidget*> in SmGlobals and call it _after_ the painting is done. * As an added Bonus we can add virt. funcs to every SmTreeView at will While at it I realized that most of the included headers were void, so remove them. No idea what impact it has on the bin size...
* Bugfix when setting DVD numberArno2013-04-071-2/+2
| | | | | | Don't call refresh on model after setting the dvd no for an index. Then the selection is lost and the other selected indexes won't be updated. Call refresh from the view after updating all indexes instead.
* New Class: SmTreeViewArno2013-04-051-29/+5
| | | | | | | | | | Code reusage: all 3 tabs had the same funtions: readHeaderConfig, writeHeaderConfig and toggleHeader, so turn it into a class derived from QTreeView. Unfortunately mATree didn't do things as later added Views, so it took some time to find the culprit in SheMov::readSettings :( Hopefully I didn't break too much...
* Make FrameCache threadedArno2013-03-291-0/+1
| | | | | create snapshot pics in a separate thread. Also use the first frame available if the clip isn't long enough for the configured frame.
* Fix ColorsArno2013-03-171-0/+1
| | | | | | | This is more a qt5-fix than a SmDirModel fix. The global palette doesn't propagate any more, so we have to set the palette in every QTreeView separately. Very annoying and tedious. Maybe I missed a Widget or two, dunno...
* Port to Qt5Arno2013-03-031-10/+10
| | | | | | | | * Change #include to qt5 * Fix missing QX11Info * use explicit constructor for QVariant(QColor) * use beginResetModel() and endResetModel() instead of reset(). The latter was removed. Hopefully it still works :)
* Fix display of series name in archiveArno2013-02-091-5/+4
| | | | | | | When hovering or showing the series name in the status bar, the code unconditionally assumed that any series has a series number. Since the introduction of subtitles this is not true any more. Just let the model figure it out by getting an index for the Name column.
* Fix setting data in ArchiveArno2013-02-091-15/+4
| | | | | Somehow editing data in the archive tree was b0rked after recent updates. It just updated the first selected item.
* Refresh view properly after setting DVD no.Arno2013-02-081-1/+4
|
* Fix "suggest file for burning"Arno2013-02-081-19/+8
| | | | | | Don't use a SQL-Query to find files. Traverse the model instead. Also check if the resulting index is already selected. All in all, make it usable again.
* Revamp MoveToBurnArno2013-02-081-15/+18
| | | | | | Only move selected files + covers to burn directory, not the entire series. Makes suggestForBurn more accurate, and we can kinda trust the selected size :)
* Change sort orderArno2013-02-071-2/+2
| | | | | Change sort order when selecting files for burning... Alphabetically is not very useful here...
* Revamp Show all Files ActionArno2013-02-071-1/+1
| | | | | Change action to show all local movies, no favorites, no pictures, to ease selection of files to burn.
* Fix crash in deleting Files from ArchiveArno2013-01-041-2/+2
| | | | | | The QModelIndexList must be a QList<QPersistentModelIndex> to prevent crashes when removeRows is called. The current QModelIndex could already be invalid.
* Allow moving files from one Series to anotherArno2012-12-301-0/+53
| | | | | Allow moving files from one SeriesPart to another. Had to add another global variable for this.
* Play selected movies from archiveArno2012-08-291-18/+41
| | | | | | | | Well, it started out as a simple new QAction for the archive: Play selected movies, but ended up in cleaning up the context menu madness in shemov.cpp. Created a factory for context menu separators... Well, and we can now play selected movies from the FilesTreeWidget :)
* Weed out PictureViewer in favor of PictureViewer2Arno2012-04-281-2/+2
| | | | Remove PictureViewer from everywhere and use PictureViewer2 instead.
* Fix FrameCache and HoverWindowArno2012-03-181-1/+2
| | | | | | Another commit that should be two. While fixing FrameCache to delete invalid Pixmaps, I ventured into the depths of HoverWindow. Now it hides when focus leaves the widget we're hovering over.
* Fix some severe braindamageArno2012-03-181-36/+23
| | | | | | | | | | | | | | It started as a buxfix session, but the more I dug into some ancient code, the more I had to change. Well, first and foremost, this fixes a crash in PicturesWidget. Trying to display the mappings of the selected picture in a different color never was a good idea. Show them in the statusbar instead. While looking at the statusBar code, make PictureWidget emit signals to show the total size and number of selected items. Then I noticed some really, really braindamaged connection madness in the Shemov constructor. Instead of doing all the work in SheMov itself, have the widgets emit signals. This should have been several commits, but one lead to another...
* Fixes for SmGlobals::FrameCacheArno2011-08-221-3/+0
| | | | | | | | | | Don't generate duplicate screenshots when the same file is indexed in different paths. Part of the frameCache key was the _full_ path, not just the filename, so duplicates piled up when hovering over the same file in the filesystem and the archive. Added a cleanup function to SmGlobals::FrameCache. Also, just use QFileInfo::fileName() as part of the key.
* Suggest file for burningArno2011-05-281-0/+37
| | | | | Implemented an action to suggest the best fitting file for burning in FilesTreeWidget. Added 20 Mb of margin to maximum dvd size.
* Fix removal of items from FilesTreeWidgetArno2011-05-271-1/+1
| | | | | | | When setting the dvd no. on several items in FilesTreeWidget, QModelIndex was used in a foreach() loop. Since the loop alters the model, the subsequent operations failed or operated on the wrong Indexes. Fixed by using a QPersistenModelIndex instead.
* Propagate changes from SeriesTreeModel::IsLocaLArno2011-05-221-2/+2
| | | | | Propagate changes to SeriesTreeModel::IsLocal to all attached views. For some reason this wasn't as easy as I thought...
* Update IsLocal when setting DVD no.Arno2011-05-221-6/+11
| | | | | | The field IsLocal in the SeriesTreeModel is now properly updated when the DVD no. changes. It still doesn't propagate to the file view, though.
* Reload view after setting DVD No.Arno2011-05-071-0/+4
| | | | | Hopefully the view gets reloaded when setting the DVD No. after burning movies to DVD. Not tested.
* Fix Hotspot of X-Cursor when hoveringArno2011-04-301-1/+2
| | | | | Made Y-Offset for the cursor configurable. After switching from kwin to awesome WM the hotspot for hovering was way off.
* Revert "Revert "Bugfix when doubleclicking on archived movie""Arno2011-03-051-16/+16
| | | | This reverts commit 465147eb8a3508859c6c1133b90db7ba85404427.
* Revert "Bugfix when doubleclicking on archived movie"Arno2011-03-051-16/+16
| | | | This reverts commit 43466f70101837c6465c2ee3307aec555744a293.
* Bugfix when doubleclicking on archived movieArno2011-03-051-16/+16
| | | | | Doubleclicking a movie in the archive didn't work any more, since the else taking care of that was in the wrong scope.
* Show metadata when hoveringArno2011-02-051-15/+53
| | | | Also show metadata in snapshot when hovering over a movie file.
* Finished metadataArno2011-01-271-1/+1
| | | | | Created a modes for metadata, revamped NewMovieWizard to use the model and created a MetadataWidget to edit and display metadata.
* Enhance FilePropertiesDialogArno2011-01-011-1/+7
| | | | | | | Use setAlternatingRowColors here, also. Set the background color of the label to ui/alternatecolor. Show the cover type and series name/part when file is an image.
* Bugfix for HoverWindowArno2010-12-311-0/+1
| | | | Hide HoverWindow when showing the contextMenu.
* Made colors configurableArno2010-12-261-1/+1
| | | | | | | | | Added a tab to ConfigurationDialog to make some colors configurable. It works somehow. The font color isn't evaluated yet, since I'm not convinced that it is a good idea. But one problem is that calling qApp->setPalette() doesn't propagate to non visible child dialogs. Dunno if it's worth fixing.
* Cache for frame grabbingArno2010-12-161-1/+1
| | | | | | | | | 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.
* Set caption for HoverWindowArno2010-12-131-0/+1
| | | | | Implement a caption for HoverWindow. Used to show the filename when hovering.
* Hover fixArno2010-12-121-1/+61
| | | | | | | When hovering over movies in local mode both the ToolTip and the hover image was shown. Fixed by only showing the ToolTip when the movie is not available, eg. archive mode. In any other case incorporate the ToolTip info into the hover image.
* Fix another hover issueArno2010-12-111-0/+3
| | | | Hide hover window if in HoverMove and the file does not exist.
* Implement hover over moviesArno2010-12-111-20/+38
| | | | | | | | | | | | | | | | | | | | 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
* Edit values in archiveArno2010-12-061-73/+47
| | | | | | | | | | This commit introduces QInputDialogs for all values editable in the archive. Inline editing in the view doesn't seem the right choice regarding usability. Fixed a long standing bug in nextDvdNo(). That was off by one. Return one more than max(value). Also got rid of DvdNoDialog, replaced by a QInputDialog.
* Fix doubleclick on pictures with DvdNoArno2010-12-051-10/+13
| | | | | | | | Display the picture in PictureViewer if the file is actually available on the filesystem and don't show a critical error if there's a DvdNo associated with it. Also fix the error dialog: show FileNameRole instead of data().
* Selectable columns in FilesTreeViewArno2010-12-051-1/+33
| | | | | | | | | Made columns shown in FilesTreeView selectable. Also, the order of columns is saved and restored. This was a difficult one. I even had to make a debug build of qt. But I fixed a serious bug in FilesTreeModel::modeName: don't access the Hash if modeName == -1.
* Bugfix in moveToBurn()Arno2010-11-061-1/+5
| | | | | | | | Using the filename from the QModelIndex isn't enough to determine wether the file is a cover or not. A series can have more than one part. So check the real file type and only copy if it's not of type Movie. This fix should obsolete the new ConsistencyChecker :)
* Fix hover issuesArno2010-10-231-57/+42
| | | | | | | | | | | | | | Hopefully this commit fixes all issues with hovering over items. First, only use QCursor::pos() to determine the position of the hover window and fix position calculation accordingly. For that SmGlobals now return a QSize of the actual cursor size. Introduced a hoverOffeset to HoverWindow defaulting to SmGlobals::cursorSize() + 30 to prevent a HoverLeave event on showing the HoverWindow. Also fixed Qt::WindowFlags of HoverWindow. We don't want the HoverWindow to show in the taskbar or get sent to background when clicking on an item.
* Fixed crash when remembering selected tab, improve performanceArno2010-10-231-51/+53
| | | | | | | | | | | Strange things happen. As stated in commit 19674f6, SheMov crashed when setting the archive as current tab and then changing to filesystem view. This can be resolved by first showing the MainWindow and then applying the display changes. I guess it's an qt internal thing. Also vastly improved performance when hovering by only entering the hover code path when we actually have a HoverEvent. Before CPU usage spiked at 100% even if SheMov was idle.
* Implemented hovering in FilesystemWidgetArno2010-10-171-0/+3
| | | | | | | | | | | Hovering over dirs and pictures show either the content of the directory or a scaled image of the picture. This is a strange commit, though. When the archive was the last opened tab the program crashes when changing to FilesystemView. I don't have the slightest clue, why, so I simply removed setting the last opened tab on startup. Also there is some strange behavior regarding the position of the HoverWindow and what Qt thinks the global position is...
* Revert "Revert "Let HoverWindow always stay on screen""Arno2010-10-171-6/+3
| | | | | | This reverts commit 20df1c43f5b7425810b5d16e3658f0772aae9b6c. revert the revert... I actually wanted to check out something...
* Revert "Let HoverWindow always stay on screen"Arno2010-10-171-3/+6
| | | | This reverts commit a3a556cc8af3433de1f8d5e22a4ba62cc029f145.