summaryrefslogtreecommitdiffstats
path: root/filestreemodel.h
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup closeEventArno2013-07-271-1/+0
| | | | | | | | | | Don't try to delete all the prepared statements manually. Get rid of the ~destructors and just close the QSqlDatabase. close() deletes all Statements. Also, quit() all QThreads on closeEvent() except CompleterProducer. When the experimental archive view gets merged, that QThread is gone. No need to bother...
* Usability: SeriesTreeViewArno2013-02-081-2/+3
| | | | | Switch back to normal view when in burn view and a series is selected in SeriesTree.
* Fix "suggest file for burning"Arno2013-02-081-2/+1
| | | | | | 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 Show all Files ActionArno2013-02-071-1/+5
| | | | | 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-1/+1
| | | | | | 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/+4
| | | | | Allow moving files from one SeriesPart to another. Had to add another global variable for this.
* Suggest file for burningArno2011-05-281-2/+2
| | | | | Implemented an action to suggest the best fitting file for burning in FilesTreeWidget. Added 20 Mb of margin to maximum dvd size.
* Implemented FilesTreeModel::fileSizeLessThanArno2011-05-271-0/+2
| | | | | | Implemented function to find movie files less a specific size to suggest suitable files for burning. Not tested, and I guess I have to take the picture size into account.
* Turned dvd size constant into a globalArno2011-05-271-0/+1
| | | | | Moved constant dvd size in bytes to SmGlobals. It spread to several source files, so it seemed to be a candidate.
* Propagate changes from SeriesTreeModel::IsLocaLArno2011-05-221-4/+1
| | | | | Propagate changes to SeriesTreeModel::IsLocal to all attached views. For some reason this wasn't as easy as I thought...
* Implement favoritesArno2011-01-161-2/+3
| | | | | SeriesParts can be marked as favorites. They won't be selectable when filtering by local Movies only.
* Configuration option for archived filesArno2010-12-271-0/+1
| | | | | Added color selection for archived files to make more clearly which files aren't present on the filesystem.
* Made all icons in qresource available for UIArno2010-12-271-0/+1
| | | | | | | | | | | | | | | | Every registered icon can be chosen as Qt::DecorationRole for all models at once. Suitable icons must be added to SmGlobals::mIcons. Key is a descriptive text, value is the icon path. To make things easier SmTreeModel got two new member functions: -QIcon decorationIcon() returning the current Icon -void setDecorationIcon() to set the current Icon The current Icon is initialized in the constructor from QSettings - ui/iconfolder To update the TreeViews connected to the FileSystemModel a little hack is needed: Just set the QFileIconProvider again. This causes the Model to update connected views.
* Made colors configurableArno2010-12-261-0/+5
| | | | | | | | | 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.
* Edit values in archiveArno2010-12-061-0/+3
| | | | | | | | | | 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.
* Bugfix in moveToBurn()Arno2010-11-061-0/+2
| | | | | | | | 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 :)
* Implemented hovering in FilesystemWidgetArno2010-10-171-1/+1
| | | | | | | | | | | 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...
* 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.
* Fixed sorting of Display nameArno2010-08-131-2/+2
| | | | | | 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.
* Show picture size or duration in FilesTreeViewArno2010-08-121-4/+12
| | | | | | | | | | | | Finally managed to view size of pictures or duration for movies in the file view. That values are not held in the database, they're created on the fly. For this to perform I created a disk based cache. I also had to create some convenience functions: FilesTreeModel::streamInfo(const QString &) FilesTreeModel::pictureInfo(const QString &) The cache is a QDataStream and will be deleted if the magic doesn't fit.
* Added tooltip to FilesTreeViewArno2010-08-071-1/+3
| | | | | Added tooltip to FilesTreeView when showing archived or local movies. The tooltip shows all files associated with the SeriesPart.
* Implement FilePropertiesDialogArno2010-07-311-0/+4
| | | | | | | | | | | 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.
* Set window title in ArchiveTreeViewArno2010-07-241-0/+9
| | | | | | | | Construct a window title in ArchiveTreeView and show it when Tab is activated or file mode is changed. Also deleted the unneded slot newWindowTitle in SheMov: setWindowTitle is a slot by itself.
* Implemented add coversArno2010-07-181-0/+4
| | | | | | Finally we can add covers to already existsing series. Seems to work, but I encountered a crash when merging series while testing... Unfortunately I don't know the cause.
* Implemented delete files from tree viewArno2010-07-181-0/+3
| | | | | 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/+1
| | | | | | 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/+3
| | | | | Files from the archive can be moved to a configurable directory with this function. The specified files won't be deleted from the database.
* Implemented two new file viewsArno2010-07-171-1/+1
| | | | Implemented filter for showing only local files or only archived files.
* Moved item creation in FilesTreeModel to functionArno2010-07-151-0/+3
| | | | | | | Created function populate(QSqlQuery) to make population of model more generic. Preparation for different views of files.
* Preparations for NewMovieWizard::acceptArno2010-07-081-0/+4
| | | | | | | -new memfunc: SeriesTreeModel::addSeries -new memfunc: SeriesTreeModel::addSeriesPart started FilesTreeModel::addFile, not finished yet.
* Sorting for FilesTreeModelArno Moeller2010-06-251-2/+2
| | | | | | | | 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-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Started implementation of FilesTreeModelArno2010-06-201-0/+40
No visible representation yet. Implemented setData for quality and dvdno, but not tested yet. Dunno yet if anything else has to be editable.