summaryrefslogtreecommitdiffstats
path: root/filestreewidget.h
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of old archiveArno2013-07-271-121/+0
| | | | Yeah, finally it's gone! Lot's of useless, unneeded code vanished :)
* Fix setAlternatignRowColorsArno2013-04-101-1/+3
| | | | | | | | | | | | | | | | | | | | 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...
* New Class: SmTreeViewArno2013-04-051-7/+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...
* Port to Qt5Arno2013-03-031-3/+3
| | | | | | | | * 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 :)
* 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.
* Allow moving files from one Series to anotherArno2012-12-301-0/+19
| | | | | Allow moving files from one SeriesPart to another. Had to add another global variable for this.
* Make headers in PictureView configurableArno2012-10-201-1/+1
| | | | | Save state of QHeaderView and restore it on startup. Maybe it's time for a SmTreeView Class implementing these generic functions...
* Play selected movies from archiveArno2012-08-291-0/+2
| | | | | | | | 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 some severe braindamageArno2012-03-181-3/+3
| | | | | | | | | | | | | | 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...
* Center Dialogs on screenArno2011-08-171-1/+0
| | | | | | 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.
* Suggest file for burningArno2011-05-281-0/+1
| | | | | 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-0/+2
| | | | | | | 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.
* Fix Hotspot of X-Cursor when hoveringArno2011-04-301-0/+1
| | | | | Made Y-Offset for the cursor configurable. After switching from kwin to awesome WM the hotspot for hovering was way off.
* Show metadata when hoveringArno2011-02-051-1/+3
| | | | Also show metadata in snapshot when hovering over a movie file.
* 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.
* Hover fixArno2010-12-121-0/+1
| | | | | | | 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.
* 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
* Edit values in archiveArno2010-12-061-17/+1
| | | | | | | | | | 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.
* Selectable columns in FilesTreeViewArno2010-12-051-0/+4
| | | | | | | | | 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.
* Fix hover issuesArno2010-10-231-0/+1
| | | | | | | | | | | | | | 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.
* Made hovering configurableArno2010-10-161-0/+4
| | | | | | 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-0/+5
| | | | | 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/+1
| | | | | | Added the possibility to edit file part numbers via context menu in FilesTreeWidget. This action triggers the edit event on the specific QModelIndex.
* Fix doubleclick in FilesTreeWidgetArno2010-08-071-0/+1
| | | | | | | | | 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.
* 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/+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.
* Bugfix commitArno2010-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | Show number of selected items of FilesTreeView in statusbar when selecting files.
* Act on doubleClick in FileTreeWidgetArno2010-07-241-0/+3
| | | | | | | | | | | | | 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/+1
| | | | | 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-0/+17
| | | | | | 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/+7
| | | | | 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-0/+13
| | | | | | 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-0/+13
| | | | | | | | 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.
* Start making FilesView workArno2010-06-231-0/+34
Introduced filestreewidget, just like seriestreewidget. The connection is still missing, though.