| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Propagate changes to SeriesTreeModel::IsLocal to all attached views.
For some reason this wasn't as easy as I thought...
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Implemented a new function showing all files belonging to the
selected series. The function respectect the current filter of
the SeriesTreeWidget.
|
|
|
|
|
| |
Use field IsLocal in SeriesTreeModel when filtering local or
archived files.
|
|
|
|
|
| |
Added a widget to display metadata beside actors and genres when
available
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
In d617e0679b426 I fixed a bug not to access the mode name hash when
mode = -1, but forgot to fix ArchiveTreeView::constructWindowTitle().
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
An unsuccessfull attempt to get rid of the warning "connection treedb is
still in use..." by trying to delete all queries and setting mDb to
QSqlDatabase() in the destructor.
Strangely enough, the warning is only issued from inside QtCreator...
Maybe it's some kind of race.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Re-select current item from SeriesTreeWidget when changing back to
FilesTreeModel::Normal.
|
|
|
|
|
|
| |
Implemented a function in MappingTableModel to remove all actors/genres
with no references in the according mapping table. Available through the
"File" menu.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First try on fixing this. Still use
QItemSelectionModel::selectionChanged, but ignore the QItemSelections.
Use QItemSelectionModel::selectedRows() instead and compute the
seriesPartIds on every change. Hopefully this guarantees having valid
QModelIndexes all the time.
This fix also obsoletes the quite awkward function
SeriesTreeWidget::mapToSource(). Make the QSortProxyModel of
SeriesTreeWidget available through SeriesTreeWidget::seriesProxy()
instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Also reset the size counter in FilesTreeWidget when changing series in
normal view.
|
|
|
|
|
|
| |
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 filter for showing only local files or only archived files.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Movie files are played in the default player when double clicking on a
movie, but not when doubleclicking on a series. The latter invokes the
edit event on the series. Don't yet know if this is a good thing or not.
Changes on the way there:
1. new helper function for finding the right player. Still need to fix
FileSystemWidget to also use the Helper::function. It's a simple copy &
paste from there.
2. added function SeriesTreeModel::findSortedMovies. It returns a
QFileInfoList sorted by seriespart and fileno.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented widgets for actor and genre editing of movies. Created new
MappingTableWidget for both genres and actors and revamped
ArchiveTreeView to show 2 widgets below the FilesTreeView separated by a
splitter.
While testing the new setup several bugs were fixed:
-an SQL syntax error in FilesTreeModel
-fixed SmModelSingleton to properly work with table names
I also changed the signature of MappingTableModel::addMapping for the
ease of use and added MappingTableModel::removeMapping.
MappingTableModel got 2 new convenience functions:
1. bool contains(QString) to check if an item is already present
2. QModelIndex find() to get the index of a specific value from the
model.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Introduced filestreewidget, just like seriestreewidget. The connection
is still missing, though.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Implemented a widget for showing series in a tree. Also implemented
filtering and sorting for this widget.
Some bugfixes and enhancements:
-Show dildo as DecorationRole in SeriesWidget
-removed Quality from SeriesWidget
|
|
|
|
|
| |
Made ArchiveTreeView work and took a look at it. Right now flat
view seems to be the better alternative.
|
|
Implemented Widget for archive tree view. It's very basic and does
nothing.
|