| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Align all widgets at top by adding an empty layout with only a stretch
at the bottom.
|
|
|
|
| |
Implemented a toolbar with various actions. Also did some artwork :)
|
|
|
|
|
|
|
|
| |
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 :)
|
|
|
|
|
|
|
|
| |
This commit reverts the previous one. You don't need a QTimer to start a
QThread member function in a separate thread. Calling start() creates a
new thread.
Implemented filesystem check and polished the dialog.
|
|
|
|
|
|
|
| |
Until now ConsistencyChecker ran in the GUI-Thread. According to the
docs the event loop of the QThread needs to be started to run something
in the thread. So use a QTimer::singleShot() to start the check
function.
|
|
|
|
|
|
| |
Made the database consistency check work and added a filter to only show
error messages in the output. The cause of the inconsistency still has
to be investigated, though.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Show ".." entry in FileView and make it go to the parent directory. Had
to work around QT Bug 14760: NoDot doesn't work so the "." entry has to
be filtered in filterAcceptsRow()
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was a tricky one. Once again SheMov spinned at almost 100% CPU
usage. This time FileView::event() was the culprit. Because FileView
uses a QFileSystemModel it receives QTimer-Events every second.
Unfortunately a static_cast from QEvent::Timer to QEvent::Hover*
succeeds so we fetched the cursor position every second and tried to get
a QModelIndex. This obviously is quite expensive.
Fixed it by checking if e->type() is of QEvent::Hover* right at the
beginning of FileView::event().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
|
| |
This reverts commit 20df1c43f5b7425810b5d16e3658f0772aae9b6c.
revert the revert... I actually wanted to check out something...
|
|
|
|
| |
This reverts commit a3a556cc8af3433de1f8d5e22a4ba62cc029f145.
|
|
|
|
| |
Fixed HoverWindow so it always stays completely on screeen.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Hovering over a cover item in FilesTreeWidget shows a HoverWindow with
the scaled image under the cursor.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
SeriesTreeWidget show a popup window with the movies assigned to the
series when hovering over a series entry.
|
|
|
|
|
|
|
|
| |
Display "Date modified" field in FSWidget as dd-mm-yyyy. Also show mime-
I guess I should subclass QFileSystemModel instead of reimplementing
data() in the proxy, because sorting by mimetype doesn't work as
expected. Unfortunately the reason eludes me...
|
|
|
|
|
| |
New context menu entry in FSWidget: archive selected. The selected files
will be inserted into the MovieInfoPage when archiving a movie.
|
|
|
|
|
|
|
|
|
| |
Well, this one should have been easy, but there's always a way to make
things complicated. Select proper entries for mPartno and mFileType in
NewMovieWizard.
Note to self: never ever forget about QObject::blockSignals(bool) again.
This is way easier than fiddling around with boolean logic...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SmTreeModel had a serious bug: SmTreeItem would accept rows >
mChildren.count() in SmTreeItem::child(int row). Do some sanity checks.
This only happened when trying to edit the type of the last file in
NewMovieWizard::MovieInfoPage, strangely enough. But this should fix it.
While working on the Wizard I tried to figure out why mItemEdit->clear
only sometimes worked. I guess it's because mItemEdit and the QCompleter
were connected to the same QKeyEvent, the latter winning and doing the
completion. "Fixed" this by removing the connection to the
returnPressed() slot of mItemEdit and giving the "Add Item" button a
shortcut. Don't really know if this is more annoying than pressing CTRL-
Also fixed a small logic error in MappingTableItemModel::lowerBound().
Revert the logic if the sort order should be ascending.
|
|
|
|
|
|
| |
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 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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Make Part no work in NewMovieWizard. The logic for this was totally
borked. Well, it was not really present. One could only assign one Part
number to all files.
|
|
|
|
| |
Created version 1.0.0 treemodel. Also removed some <QDebug> includes.
|
|
|
|
|
| |
Remember selected tab on startup. Also remember selected view mode from
archive.
|
|
|
|
|
| |
Re-select current item from SeriesTreeWidget when changing back to
FilesTreeModel::Normal.
|
|
|
|
|
| |
Added tooltip to FilesTreeView when showing archived or local movies.
The tooltip shows all files associated with the SeriesPart.
|
|
|
|
|
| |
Insert a dummy file into the database when adding files already
archived.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extended the filter function in SeriesTreeWidget. By passing an operator
to the filter dialog series can be filtered. The code generates highly
dynamic SQL queries. I hope I didn't introduce possible SQL injections.
Filter operators:
g: genre
a: actor
q: quality
n: filename
d: dvd no
s: size
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Implemented a function in MappingTableModel to remove all actors/genres
with no references in the according mapping table. Available through the
"File" menu.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
While trying to find out why a newly added SeriesPart won't get selected
programmatically, I discovered a not so serious SQL bug.
MappingTableModel::addMapping happily tries to execute queries with an
invalid seriesPartId. Return if seriesPartId = -1.
Now all items expanded previously will be expanded after adding a new
movie. (SeriesTreeWidgetT::seriesAdded). Unfortunately the original
problem remains unsolved...
|
|
|
|
|
|
|
|
|
|
|
| |
mCurrentType wasn't initialized in AddCoverDialog constructor, so it
ended up with a random number. Fortunately it was too big for a
Pg::SmallInt and the db choked with the value being too big for a
Pg::SmallInt.
Fix: Connect QComboBox::currentIndexChanged(QString) first and then add
items to the QComboBox. That triggers the SLOT and sets mCurrentType to
the right value.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix adding quality to cover files in database by binding a NULL value
when type != Movie in FilesTreeModel.
While fixing this I discovered a typo in the database schema. The
sequence for genres was named genres_igrenres_id__seq. Removed the
superfluous 'r' in the name and fixed migdb.py on the way.
Now SheMov doesn't crash any more when adding a new series part, but the
new item still doesn't get selected...
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
adapted StatisticsDialog to the new database schema and make it use
WebKit and HTML to display the graph bars.
This change obsoleted the classes ActorCountModel and GraphBarWidget.
|
|
|
|
|
| |
Show number of selected items of FilesTreeView in statusbar when
selecting files.
|
|
|
|
|
|
|
| |
Select the last selected series with
QItemSelectionModel::setCurrentIndex(), otherwise the current index
won't be set. On closing the program currentIndex() would be invalid and
nothing is selected when starting SheMov again.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
SeriesTreeWidget::writeSettings() writes currentIndex() to QSettings on
close. readSettings() selects it again on startup.
I tried to remember all selected indexes, but that got way too complex
and didn't work when SeriesParts were selected. Somehow
QItemSelectionModel wouldn't select indexes with parents other than
QModelIndex().
|
|
|
|
|
|
| |
Don't add items to mExpandedItems in readSettings. This already happens
in the slot itemExpanded. Before the list quickly filled up with
duplicate entries.
|