summaryrefslogtreecommitdiffstats
path: root/filestreewidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Let HoverWindow always stay on screenArno2010-10-171-6/+3
| | | | Fixed HoverWindow so it always stays completely on screeen.
* Made hovering configurableArno2010-10-161-2/+12
| | | | | | Revamped misc tab in configurationdialog to QGroupBoxes. Added options for enabling or disabling hovering over pictures or the archive tree. Also implemented an option to set the opacity for HoverWindow.
* Hover for FilesTreeWidgetArno2010-10-161-1/+69
| | | | | Hovering over a cover item in FilesTreeWidget shows a HoverWindow with the scaled image under the cursor.
* Created general purpose HoverWidgetArno2010-10-161-0/+1
| | | | | | This commit outsources the HoverWindow to a seperate file and makes it possible to set a pixmap to the window. Also the cursor offset is only calculated once in SmGlobals.
* Implemented editing of file part numbersArno2010-08-131-0/+8
| | | | | | Added the possibility to edit file part numbers via context menu in FilesTreeWidget. This action triggers the edit event on the specific QModelIndex.
* Fixed sorting of Display nameArno2010-08-131-0/+5
| | | | | | Fixed sorting of DisplayName column in FilesTreeModel. Now it's sorted by SeriesName and SeriesPart separately instead of taking the whole DisplayName as a string.
* Fix doubleclick in FilesTreeWidgetArno2010-08-071-0/+9
| | | | | | | | | Doubleclicking the DvdNo in FilesWidget did 1. play the movie 2. create an editor event in the widget Now doubleclicking only starts the default player. The quality can be edited via context menu.
* Verion bumpArno2010-08-071-2/+0
| | | | Created version 1.0.0 treemodel. Also removed some <QDebug> includes.
* Usability fix1.0.0Arno2010-08-071-0/+1
| | | | | Remember selected tab on startup. Also remember selected view mode from archive.
* Added tooltip to FilesTreeViewArno2010-08-071-0/+1
| | | | | Added tooltip to FilesTreeView when showing archived or local movies. The tooltip shows all files associated with the SeriesPart.
* Implement FilePropertiesDialogArno2010-07-311-0/+33
| | | | | | | | | | | 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.
* Bugfix commitArno2010-07-301-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The journey through the internals of SheMov started by fixing SeriesTreeWidget::readSettings(). The selected index didn't really get selected on startup because only QItemSelectionModel::setCurrendt() was called. Replace it with QItemSelectionModel::select() and QTreeView::setCurrent(). Also fix SeriesTreeWidget::writeSettings() to only write selected items to QSettings() when something is selected. While working on selections I realized that there is a serious bug in Helper::moveToArchive. The destination directory in the archive must be created if it doesn't exist. For a testcase I needed an easy way to move files back from the archive to incoming directory, so I added FilesTreeWiget::moveToDirectory(). This lets you move files from the FilesTreeWidget to any directory. During testing I realized that SeriesTreeWidget::deleteFromSeries() QMessageBox() doesn't show files when deleting a series part. Fixed that by adding SeriesParts to file list. Finally a newly added SeriesPart gets selected and selected by expanding it first and then calling QItemSelectionModel::select() To make a long story short: 1. fix SeriesTreeWidget::{read,write}Settings 2. add FilesTreeWidget::moveToDirectory() 3. fix SeriesTreeWidget::deleteFromSeries() QMessageBox 4. fix selecting newly added SeriesParts
* Fix selected items in statusbar for archiveArno2010-07-241-0/+5
| | | | | Show number of selected items of FilesTreeView in statusbar when selecting files.
* Act on doubleClick in FileTreeWidgetArno2010-07-241-5/+34
| | | | | | | | | | | | | When doubleclicking a picture in FileTreeWidget the pictureViewer is shown. Doubleclicking a movie file launches the default movie player. Since PictureViewer is now used in FileSystemWidget and ArchiveTreeView a global instance is needed. The appropriate place for this is a singleton. Since we already had a singleton for QAbstractItemModels I renamed it to SmGlobals and added a function to return a PictureViewer object. Renaming it was quite easy thanks to QtCreator's ability to rename variable names.
* Implemented delete files from tree viewArno2010-07-181-0/+20
| | | | | Files can now be delete from the files tree view. When doing so, the files will be deleted permanently and also removed from the database.
* Implemented setDvdNo for FilesTreeArno2010-07-181-1/+64
| | | | | | The dvd number can be set for several files at once with this function. Also fixed a little bug when showing the series name in the status bar. Only show file part number if it is > 0.
* Implemented "move to burn directory" for TreeWidgetArno2010-07-181-0/+55
| | | | | Files from the archive can be moved to a configurable directory with this function. The specified files won't be deleted from the database.
* Preparation for new move to burn implementationArno2010-07-171-1/+44
| | | | | | Show size of selected items in status bar when files are selected in the FileView. Also show series name of current selected file in the general status bar.
* Sorting for FilesTreeModelArno Moeller2010-06-251-2/+22
| | | | | | | | Implemented individual sorting for FilesTreeModel: 1. Don't compare the "Movies" and "Covers" nodes, keep the initial order. 2. Compare Size and DvdNo by int/longlong instead of comparing the displayed strings.
* Made FilesTreeWidget workArno2010-06-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | It wasn't as easy as I thought. Quite big changes: 1. I changed the query for setIds in FilesTreeModel. Initially it executed a database query for every id. Changed it to WHERE seriespart_id IN (ids). I didn't have a chance to test the first version, but this one is blazing fast. 2. Fixed a recursio ad infinitum in FilesTreeModel. This happens if you call data() from data(). Either use the *item or use a role different from what you've been called. 3. Introduce a new function in SeriesTreeModel: QList<QVariant> childrenColumnList. It returns a QList from the children values of the given column. 4. Lot's of UI changes. Hide unneded columns, align the remaining ones properly. What doesn't work: we can't let the database do the sorting of files. We need a proxy for this.
* Start making FilesView workArno2010-06-231-0/+18
Introduced filestreewidget, just like seriestreewidget. The connection is still missing, though.