summaryrefslogtreecommitdiffstats
path: root/shemov.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Implemented delete stray actorsArno2011-12-171-0/+23
| | | | | Added a tab to DbAnalyzerDialog for actors that aren't associated with a movie and make it possible to delete them.
* DbAnalyzer first tryArno2011-12-161-0/+11
| | | | | Well, trying to join the consistencyChecker and the check for stray actors/genres. First try :)
* Suggest file for burningArno2011-05-281-0/+5
| | | | | Implemented an action to suggest the best fitting file for burning in FilesTreeWidget. Added 20 Mb of margin to maximum dvd size.
* Turned dvd size constant into a globalArno2011-05-271-1/+1
| | | | | Moved constant dvd size in bytes to SmGlobals. It spread to several source files, so it seemed to be a candidate.
* Display size in MiBArno2011-05-221-3/+7
| | | | | Display size of selected files in MiB in the status bar. Also show bytes free if the selected files would be burned to a DVD.
* Artwork for show all files actionArno2011-05-221-1/+2
| | | | | Added an icon for show all files action. Also added it to the toolbar.
* Propagate changes from SeriesTreeModel::IsLocaLArno2011-05-221-18/+6
| | | | | Propagate changes to SeriesTreeModel::IsLocal to all attached views. For some reason this wasn't as easy as I thought...
* Implement show all filesArno2011-05-151-0/+7
| | | | | | Implemented a new function showing all files belonging to the selected series. The function respectect the current filter of the SeriesTreeWidget.
* Reload view after setting DVD No.Arno2011-05-071-1/+1
| | | | | Hopefully the view gets reloaded when setting the DVD No. after burning movies to DVD. Not tested.
* Fix exit actionArno2011-04-301-1/+1
| | | | | | Don't connect mQuitA to quit(), use qApp::closeAllWindows() instead. The former doesn't trigger closeEvent() so settings aren't written at exit.
* PictureViewer fixesArno2011-04-301-0/+1
| | | | | | Add an option making resizing the picture viewer to the size of the picture configurable. It's desirable when using a tiling window manager.
* Edit genres and actorsArno2011-02-191-0/+19
| | | | Added dialog for editing actors and genres.
* Added filter option for favoritesArno2011-01-221-3/+16
| | | | | Added filter for only showing series marked as favorites. The other filter options are disabled when in this mode.
* Implement favoritesArno2011-01-161-3/+8
| | | | | SeriesParts can be marked as favorites. They won't be selectable when filtering by local Movies only.
* Automatically add files in configured folder when archiving moviesArno2011-01-091-0/+11
| | | | | | Added an option to automatically add files in a configurable folder when archiving movies. It's intended for putting cover files in that directory so they don't have to be added manually.
* Fix qWarnings() at startup and shutdownArno2010-12-301-3/+4
| | | | | | | | | | | | | | Fix unexpected NULL receiver on startup: Turns out this warning is issued when calling deleteLater on a NULL object. This happened in SheMov::createOpenWith*. The "database is still in use" warning was a bit harder to track down. First of all, the destructors weren't called since Qt::WA_DeleteOnClose wasn't set for SheMov, so Qt would simply exit and let the OS do the cleanup without calling the destructors. Then there were several orphan widgets/objects without a parent, so their destructor would never be called.
* Pimp my filters!Arno2010-12-281-8/+62
| | | | | | | | | | | | Enhanced the filter function in ArchiveTreeView. The prefixes are gone. The filter mode is now selectable by menu or toolbar. Created 7 new icons, also selectable in the configuration menu. As a bonus the filter QLineEdit now comes with a QCompleter. The QStringListModel of the completer is filled in a separate thread. The QThread is only used as a resource for control. The work is done in a QObject connected to the QThread's started() signal as described in http://labs.qt.nokia.com/2006/12/04/threading-without-the-headache/
* 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-3/+14
| | | | | | | | | 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.
* Fix copy, cut and paste filesArno2010-12-211-11/+26
| | | | | | | | | | Make this options in the context and edit menu of FilesystemWidget behave a lot more as expected. Copy and cut just copies the file names to the clipboard, and paste paste moves them if they were cut and copies them when the action was copy. Still need to fix the colors when something is marked somehow. Should be configurable :)
* Fix rename files in FSWidgetArno2010-12-181-1/+1
| | | | | | Rename files inline, letting the model do all the work. Part of getting rid of MessageDialog. Maybe this broke the filename templates. We'll see...
* Fix menusArno2010-12-111-43/+68
| | | | | | | Fix sort order of menuBar(). It was different in AV and FSV. First comes Edit, then View. Create seperate View menus for FSV and AV.
* Implement hover over moviesArno2010-12-111-17/+37
| | | | | | | | | | | | | | | | | | | | 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-10/+24
| | | | | | | | | | 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.
* Typo fixArno2010-12-051-1/+1
| | | | windwos != windows
* Selectable columns in FilesTreeViewArno2010-12-051-0/+48
| | | | | | | | | 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.
* Added action to copy file path to clipboardArno2010-11-281-0/+28
| | | | | | | | | 4 new actions to copy the file path to clipboard. It's either the unix full path, the unix dir, the windows full path or the windows dir. For the latter '/' is replaced with '\' and a drive letter is prepended. The drive letter is configurable in the ConfigurationDialog. While at it I revamped it and added another tab to make it more user friendly.
* Remove unused QSignalMapperArno2010-11-271-2/+0
| | | | | Remove unused QSignalMapper from shemov causing a warning on startup. Seems to be a leftover from implementing the toolbar.
* Implemented dialog for showing movies without coversArno2010-11-271-0/+6
| | | | | | | | | Implemented a new dialog to show movies without covers. The view is a QTreeView with another model. While working on the model several shortcomings of SmTreeModel were resolved. findValue() now takes another argument to indicate the column the returned QModelIndex() should represent. Also, itemAt() was promoted from private to protected. It's quite useful for derived classes.
* Implemented mark as seenArno2010-11-211-0/+11
| | | | | | | Added new action to mark files as seen. Marked files have the foreground color red. For this the database connection is needed quite early, so I had to call SmGlobals::instance() in the constructor of SheMov without using it.
* Added support for mounting cd/dvdsArno2010-11-201-0/+22
| | | | | | DVDs or CDs can be mounted under *NIX like OS now. It still eludes me how to refresh a directory from a QFileSystemModel when it's mounted. Maybe it's a qt bug...
* Added ToobarArno2010-11-071-6/+63
| | | | Implemented a toolbar with various actions. Also did some artwork :)
* First try on ConsistencyCheckerArno2010-10-311-0/+9
| | | | | | | Well, it works, so let's shit it :) Unfortunately the database is inconsistent, so add a checker for that. Still needs some work, though. Eg. display errors seperately and make it possible to delete stray files. Also the Filesystem check must be implemented.
* 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.