summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix about dialogArno2010-10-301-1/+1
| | | | | | Removed reference to cryptopp from about dialog. Not using it any more for a long time. Also added build field. When calling distrib.sh it's replaced with the commit no. and the date.
* Fixed crash when remembering selected tab, improve performanceArno2010-10-231-3/+9
| | | | | | | | | | | 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-4/+0
| | | | | | | | | | | 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...
* Made hovering configurableArno2010-10-161-0/+2
| | | | | | 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.
* Implemented "Archive selected" actionArno2010-10-031-0/+18
| | | | | New context menu entry in FSWidget: archive selected. The selected files will be inserted into the MovieInfoPage when archiving a movie.
* Implemented editing of file part numbersArno2010-08-131-0/+3
| | | | | | Added the possibility to edit file part numbers via context menu in FilesTreeWidget. This action triggers the edit event on the specific QModelIndex.
* Show picture size or duration in FilesTreeViewArno2010-08-121-0/+2
| | | | | | | | | | | | 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.
* Fix doubleclick in FilesTreeWidgetArno2010-08-071-0/+3
| | | | | | | | | 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.
* Usability fix1.0.0Arno2010-08-071-3/+25
| | | | | Remember selected tab on startup. Also remember selected view mode from archive.
* Fixed edit trigger in SeriesTreeViewArno2010-08-051-0/+3
| | | | | | | | | | | | | | | | | | | | | Until now doubleclicking an item with children in SeriesTreeWidget did 3 things: 1. Expand or collapse the item 2. Trigger editing 3. Start playing all child movies in the default player This is not really expected behavior. So I disabled all EditTriggers on SeriesTreeView and set expandsOnDoubleClick to false. To still retain the ability to edit series a new slot was introduced to SeriesTreeWidget triggering the edit event. It's available from the SeriesTreeWidget context menu. Now doubleclicking an item in SeriesTreeView just plays all child movies. Child items also have their name changed when changing the parent item. This bug was long present in renameSeries. mergeSeries always did the right thing (tm).
* Implement FilePropertiesDialogArno2010-07-311-0/+6
| | | | | | | | | | | 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.
* Added database maintenance codeArno2010-07-311-2/+16
| | | | | | Implemented a function in MappingTableModel to remove all actors/genres with no references in the according mapping table. Available through the "File" menu.
* Bugfix commitArno2010-07-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Reset NewMovieWizardArno2010-07-281-2/+6
| | | | | | | | | | | | | | | | | Well, the point of this commit was to have one NewMovieWizard in memory all the time and just show it when it's needed. For this several things were necessary: 1. implement initializePage() for every QWizardPage. For this I had to implement reset functions in some models. 2. setOption(QWizard::IndependentPages, true) in Wizard constructor. 3. Make NewMovieWizard a member of SheMov... Well, it was, already, but I didn't remove the ptr. The good news: the Wizard works. Bad News: 1. Program crashes in ArchiveViewWizard::currentChanged (see TODOS) 2. Cover files also have a quality Attribute attached.
* Fix selected items in statusbar for archiveArno2010-07-241-0/+6
| | | | | Show number of selected items of FilesTreeView in statusbar when selecting files.
* Act on doubleClick in FileTreeWidgetArno2010-07-241-3/+2
| | | | | | | | | | | | | 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.
* Fix database configurationArno2010-07-241-15/+2
| | | | | Remove default database from SheMov. Now open named database in SmModelSingleton and use configured settings.
* Set window title in ArchiveTreeViewArno2010-07-241-5/+5
| | | | | | | | 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.
* Big code cleanupArno2010-07-231-122/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hopefully removed all code connected to ArchiveViewWidget in this tree. Files removed ({h,cpp}): *archiveeditdialog *listeditor *covereditor *archivefilewidget *addmoviewizard *archivefileview *archiveproxy *sizedelegate *archivedidelegate *archiveitemeditdialog *coveritem *movieitem *moviemodel *moviemodelsingleton *listmodel *listmodelsingleton *archiveviewwidget *archiveiteminfoedit *archiveitemcoveredit *fileinfoitem *fileinfomodel See added file TODOS for stuff that needs fixes.
* Implemented add coversArno2010-07-181-1/+7
| | | | | | 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/+6
| | | | | 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/+6
| | | | | | 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/+14
| | | | | | 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.
* Implemented two new file viewsArno2010-07-171-0/+28
| | | | Implemented filter for showing only local files or only archived files.
* Fix MovieInfoPageArno2010-07-041-0/+12
| | | | | | | | | | | | | | | The first page of NewMovieWizard gave me quite a headache. It crashed with a segmentation fault because of exposing mDvdNo via registerField() without actually assigning a QCheckBox to it. The backtrace isn't very helpful in such a case. I also fixed some bugs on the way: 1. use SmTreeItem::setData in SmTreeModel::addRow instead of deleting the old item and creating a new one. This way I don't need to take care of the parent. 2. get data of old item in SmTreeModel::reparent before calling removeRows. This call deletes the item. 3. Fix column alignments in WizardTreeModel for size column
* Implemented "open with" submenu in ArchiveTreeViewArno2010-07-021-3/+14
| | | | | | | | | Changes: -changed signature of ArchiveTreeView::playSelected() to take a QString argument for the preferred player -Bugfix in SeriesTreeModel::findSortedMovies: use SeriesId for mSortedMovieListQuery -SheMov: use mOpenWithMapperAV for mATree instead of deprecated mAVWidget
* Singleton cleanupArno2010-06-231-3/+2
| | | | | | | | | | The SmUberModel class wasn't needed at all, so I removed it. Instead I renamed SmUmberModelSingleton into a real singleton for all QAbstractItemModel*, though right now it only supports the SeriesTreeModel and FileTreeModel. But it should eventually evolve into a singleton for all QAbstractItemModel *. For this I renamed the class SmUberModelSingleton to SmModelSingleton.
* expand/collape actions for SeriesTreeWidgetArno2010-06-181-3/+16
| | | | Implemented expand and collapse actions for SeriesTreeWidget.
* read/write settings for SeriesTreeWidgetArno2010-06-181-0/+2
| | | | | SeriesTreeWidget now retains its last state regarding sort order and expanded items.
* Created frontend for SeriesTreeModel::deleteFromSeriesArno2010-06-181-2/+3
| | | | | | | | | | | Implemented frontend for SeriesTreeModel::deleteFromSeries. I hope QPersistentModelIndexes work as advertised. From the qt-sources it seems that a QPersistentModelIndex is automatically updated by QAbstractItemModel when calling begin(Remove|Insert)Rows. Testing worked out fine. While at it I found a bug in SmTreeModel. removeRows has to be called with (i - 1) instead of (i) to remove the correct nodes.
* Implemented SeriesTreeModel::deleteFromSeriesArno Moeller2010-06-181-0/+1
| | | | It compiles, let's ship it. Totally untested.
* SeriesTreeModel::findFilesArno2010-06-171-0/+2
| | | | | | Implemented SeriesTreeModel::findFiles in preparation for deleting files from SeriesTreeView. Totally untested, of course, and the new action in SheMov doesn't do anything.
* Partial implementation of adding new SeriesArno Moeller2010-06-171-0/+6
| | | | | | Adding an item to the TreeView works, but it doesn't get focus after inserting. Also the data is not shown. And setting the title of the new item should make the database puke.
* Fixed SeriesTreeModelArno Moeller2010-06-171-0/+3
| | | | | There was no serious problem with the database schema. Maybe I should have gone to bed earlier. Updating and changing series names now works.
* Made ArchiveTreeView workArno2010-06-121-0/+3
| | | | | Made ArchiveTreeView work and took a look at it. Right now flat view seems to be the better alternative.
* Implemented copying of movie dataArno2010-05-301-0/+4
| | | | | Added function to copy actors, covers, genre, dvd and quality to other parts of the same movie if movie has multiple files.
* Get rid of obsolete classesArno2010-05-291-8/+0
| | | | | Get rid of EditArchiveItemDialog and CoverArchiveEditor. The functionality of the classes is implemented in ArchiveItemEditDialog.
* Implement new ArchiveItemEditDialogArno2010-05-291-1/+2
| | | | | | | | | | | | | | | | Use ArchiveItemEditDialog instead of EditArchiveItemDialog. The latter will soon be obsolete and removed. Terrible naming, though. This commit is not as atomic as I want it to be, but it can't be helped. I had to fix several bugs in ArchveItemInfoEdit and ArchiveItemCoverEdit on the way: -Fix layout of ArchiveItemCoverEdit -Make white background of warning label in ArchiveItemCoverEdit work -Add function to ArchiveItemInfoEdit to init the ActorModel and FileInfoModel -Add function to ArchiveItemInfoEdit to return selected actors Beware: The update button still does nothing!
* Close PictureViewer on exitArno2010-05-241-0/+2
| | | | Close PictureViewer window when exiting SheMov.
* Use singletons for modelsArno2010-05-221-5/+6
| | | | | Created singletons for the ListModel* and MovieModel*. There should only be one of each and they were passed around quite a lot.
* Fix bug in setFsFree()Arno2010-05-141-3/+3
| | | | | Make height of QLabel dependent on font size instead of its own heigt. The latter makes it grow in height from every call to setFsFree().
* Fix calls to setFsFree()Arno2010-05-141-2/+4
| | | | | Move connect() to constructor and also recalculate free space after removing files by connecting to rowsRemoved(QModelIndex,int,int).
* Cleanup archive extractionArno2010-05-141-29/+0
| | | | | Removed the code for archive extraction. Never used it, never liked it and really never worked properly.
* Added "Play selected" and "Open with" to ArchiveViewWidgetArno2010-05-141-34/+67
| | | | | | | | | | | | | | | Implemented "Play selected movies" and "Open with" functions in ArchiveViewWidget. Also fixed a potential crash when re-creating the "Open with"-submenus. It's not possible to remove actions from an ActionGroup while iterating over the group with foreach. The ActionGroup is modified when calling removeAction() thus throwing the iterator of the loop off. Solution: First remove the actions from the ActionGroup and then delete the ActionGroup itself. The QObject destructor will take care of the contained Actions.
* Revamped ArchiveViewWidget context menuArno2010-05-141-7/+15
| | | | | Add separators to ArchiveViewWidget->fileView() contextmenu using QActions and by integers during construction of QMenu.
* Discard QDirModelArno2010-05-121-9/+4
| | | | QDirModel is deprecated by the Nokia guys. Use QFileSystemModel instead.
* Re-added Rename File to FileView contenxt menuArno2010-05-121-0/+1
| | | | Forgot it the first time.
* Solved issue with mRefreshA in FilesystemWidgetArno2010-05-121-1/+1
| | | | | | | | | | FilesystemWidget needs a pointer to the QAction triggering a refresh to disable it under certain circumstances. The current solution was to search the actions() of a child widget for a specific string in QAction::data(). Don't like it. Now SheMov sets the refresh action via a member function of FilesystemWidget.
* Implemented "Open with"Arno2010-05-121-0/+1
| | | | | | The contextmenu of Fileview got an "Open with" submenu containing all configured programs. Opening files does not depend on MIME-types. That means a movie can be opened with a pictureviewer and vice versa.