| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Fix FileView + FilesystemWidget.
* Get rid of useless qobject_casts
* Remove hover over movies and directories
* Fix shortcut for (de-)selecting files
|
|
|
|
|
| |
* Don't show the mapping item in preview, because it has none.
* Use qApp->showOverrideCursor() instead of QWidget::cursor()
|
|
|
|
|
|
|
| |
Add a configuration Option to (de-)select expensive file operations.
That would be md5Summing and gathering the Bitrate/Duration.
That should help the performance on networked directories...
|
|
|
|
|
|
|
|
|
|
|
| |
Get rid of SmDataCollector and do its job in small, QRunnable tasks and
let QThreadPool manage the treads.
Works well with a local Filesystem. Yet to see how it works over
networked Filesystems.
Ah, before I forget: NEVER, EVER USE QPixmap in THREADS -> Random
crashes! (Yes, I know, it's documented...)
|
|
|
|
| |
Show a progress dialog when gathering data from the filesystem.
|
|
|
|
|
|
|
| |
I think I found the bug. We need to stop the refresh timer when
operating on the view, because it can reset the model while we're still
holding QModelIndexes. When that happens we're working with invalid
indexes and BOOM.
|
|
|
|
|
|
|
| |
This reverts commit 06cfadc8386aec27b9c7c43486fc0b057e9fb022.
Turns out that this was not the root cause for the crashes.
Still stumped.
|
|
|
|
|
|
|
| |
This stuff was racy from the beginning. It could happen that the model
got reset after we fetched the selected indexes. Add a mutex and lock it
before operating on the file view. Hopefully this will many, if not all
random crashes.
|
|
|
|
| |
Set the main window title according to selected tab.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use JSON output from ffprobe instead of string parsing to get some kind
of type safety.
For doing that, some changes were needed in FileView: Use delegates for
displaying Duration and Bitrate instead of mangling output in
Qt::Displayrole.
To reuse code, move all delegates from the new Archive to a separate
file.
And, of course, the initial objective: Show the accumulated size and
duration of selected files in the status bar from the experimental
archive.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Well, what started as a try to simplify QTreeView ended in a mass header
murder...
What happened:
* I searched for a way to let every QTreeView honor the
setAlternatingRowcolors() setting. Unfortunately it isn't enough to just
set the global palette and set it to true. So every QTreeView is now
derived from SmTreeView
* SmTreeView registers itself with SmGlobals, so the property is set
_after_ it's constructed. It's definitely not enough to call it in the
constructor. I guess that's a bug. But it's enough to append the
SmTreeView to a QList<QWidget*> in SmGlobals and call it _after_ the
painting is done.
* As an added Bonus we can add virt. funcs to every SmTreeView at will
While at it I realized that most of the included headers were void, so
remove them. No idea what impact it has on the bin size...
|
|
|
|
|
| |
Indicate if we already have a file by coloring the filename darkGreen
when browsing the filesystem.
|
|
|
|
|
| |
Consolidate duration and size in one Field, like in the archive, to be
consistent. Also rename the Role and Field accordingly.
|
|
|
|
|
|
| |
If file is an image, grab the size and add it to the model.
Also, remove some leftover debug statements from SmTreeView.
|
|
|
|
|
| |
Save headerView on exit, create a Menu for selecting headers and read
headerConfig on startup.
|
|
|
|
|
|
| |
Since can reset the FileView through a time, remember the selections on
reset and restore them after. The Timer is stopped when an item is being
edited.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A huge commit, I know, but it was definitely worth it! It makes the
homebrew FilesystemModel work! It's divided up into two threads:
1. The Watcher: it reacts on inotify events and dispatches them to:
2. The Collector: this thread gathers the data and emits the SIGNALS to
the the view.
Now we can actually refresh the View, not possible with
QFileSystemModel, and the data reloads in almost real time without
blocking the GUI.
Unfortunately this uncovered some bugs I had to fix:
1. Helper::md5sum: Don't crash if read fails with -1
2. SmTreeModel::addRow is broken. Even after 5h I couldn't figure out
how or why, so I brute forced it. Reset the moded when a file is added.
3. Get rid of a lot of unneeded #include's
I guess that's about it...
|
|
|
|
|
|
| |
blocking the GUI isn't nice, so use a separate Thread to gather all the
data for SmDirModel. Populating and changing directory works, but
modifying a file is most likely broken.
|
|
|
|
|
|
| |
4969cdba731671df80df951543dc47c4e52d70de "fixed"
QFileSystemModel::FilePathRole for that function. We're actually
querying the DirModel, unfix it.
|
|
|
|
|
| |
Automatically resize FileView when it changes. I guess I was quite drunk
on the first try. Fortunately I didn't commit it :)
|
|
|
|
| |
Wasn't used anyway, dropped DB-Table seen also.
|
|
|
|
|
|
|
| |
This is more a qt5-fix than a SmDirModel fix. The global palette doesn't
propagate any more, so we have to set the palette in every QTreeView
separately. Very annoying and tedious. Maybe I missed a Widget or two,
dunno...
|
|
|
|
|
| |
Make NewMovieWizard work again and fix QFileSystemModel::FilePathRole
usage. QFileSystemModel::FilePathRole -> SmDirModel::FullPathRole
|
|
|
|
|
| |
Made Icons for SmDirModel configurable. For now it's folders, movies,
pictures and others.
|
|
|
|
| |
I think I got it working! It does what I want it to do :)
|
|
|
|
|
|
|
|
| |
Gotta take a break here. Hopefully this will end up in a custom
QFilesystemModel, but I'm hitting so many bugs on the way. Some things
haven't worked for ages, I guess.
Anyway, the watcher doesn't do anythying right now, still fixing bugs...
|
|
|
|
|
|
|
|
| |
* Change #include to qt5
* Fix missing QX11Info
* use explicit constructor for QVariant(QColor)
* use beginResetModel() and endResetModel() instead of reset(). The
latter was removed. Hopefully it still works :)
|
|
|
|
|
| |
Add menu entry to move files back to archive. Needed when move to burn
directory copies more files than expected.
|
|
|
|
| |
Remove PictureViewer from everywhere and use PictureViewer2 instead.
|
|
|
|
|
|
| |
Show red or green icon in status bar, depending on wether we're sliding.
Removed the rename to template stuff. It was barely used code. Hopefully
deleted all references and code fragments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It started as a buxfix session, but the more I dug into some ancient
code, the more I had to change.
Well, first and foremost, this fixes a crash in PicturesWidget. Trying
to display the mappings of the selected picture in a different color
never was a good idea. Show them in the statusbar instead.
While looking at the statusBar code, make PictureWidget emit signals to
show the total size and number of selected items. Then I noticed some
really, really braindamaged connection madness in the Shemov
constructor. Instead of doing all the work in SheMov itself, have the
widgets emit signals.
This should have been several commits, but one lead to another...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Remove all references of MessageDialog, including files :)
|
|
|
|
|
|
|
|
|
|
| |
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 :)
|
|
|
|
|
|
| |
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...
|
|
|
|
|
|
| |
Remove debug statements from FileSystemWidget. Also remove useless
helper func StringListContains. That was a goodie. I guess I was quite
drunk when I wrote that...
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Keep FSWidget updated when mounting a dvd. It's an ugly hack involving
changing the current directory several times, but it works...
|
|
|
|
|
|
| |
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...
|
|
|
|
| |
Implemented a toolbar with various actions. Also did some artwork :)
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Save and restore PictureViewer position on exit and startup.
|
|
|
|
|
|
|
| |
Don't call an external program for showing a picture. When an image is
doubleclicked a new windows shows the picture. Pictures can still be
opened in an exteral program by using the "Open with..." context menu
item.
|
|
|
|
|
| |
Removed the code for archive extraction. Never used it, never liked it
and really never worked properly.
|
|
|
|
| |
QDirModel is deprecated by the Nokia guys. Use QFileSystemModel instead.
|
|
|
|
|
|
|
|
|
|
| |
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.
|