summaryrefslogtreecommitdiffstats
path: root/fileview.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of FrameCacheArno2013-09-141-1/+0
|
* Code cleanupArno2013-09-141-38/+12
| | | | | | | Fix FileView + FilesystemWidget. * Get rid of useless qobject_casts * Remove hover over movies and directories * Fix shortcut for (de-)selecting files
* Code cleanup: remove hover over directoriesArno2013-09-141-7/+1
| | | | | Remove (hopefully) all remnants of this option. Not needed, wasn't working anyway.
* Switch to QRunnable + QThreadPoolArno2013-09-031-3/+1
| | | | | | | | | | | 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...)
* Implement file properties dialogArno2013-07-281-0/+11
| | | | | | | | Show file properties in Filemanager and Archive, if the file is available. Also get rid of the palette stuff in SmGlobals. Just call setPalette() early enough and set it in SmTreeView.
* Read JSON from ffprobeArno2013-07-271-19/+9
| | | | | | | | | | | | | | | | 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.
* Fix setAlternatignRowColorsArno2013-04-101-6/+5
| | | | | | | | | | | | | | | | | | | | 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...
* Make check for present files configurableArno2013-04-061-0/+2
| | | | | Add a configuration option for checking the database when browsing the filesystem.
* Put duration and size in one Field (SmDirModel)Arno2013-04-061-1/+1
| | | | | Consolidate duration and size in one Field, like in the archive, to be consistent. Also rename the Role and Field accordingly.
* New Class: SmTreeViewArno2013-04-051-39/+1
| | | | | | | | | | Code reusage: all 3 tabs had the same funtions: readHeaderConfig, writeHeaderConfig and toggleHeader, so turn it into a class derived from QTreeView. Unfortunately mATree didn't do things as later added Views, so it took some time to find the culprit in SheMov::readSettings :( Hopefully I didn't break too much...
* Make FilesystemWidget headers configurableArno2013-04-051-1/+38
| | | | | Save headerView on exit, create a Menu for selecting headers and read headerConfig on startup.
* Make FrameCache threadedArno2013-03-291-0/+1
| | | | | create snapshot pics in a separate thread. Also use the first frame available if the clip isn't long enough for the configured frame.
* Set NoEditTriggers on FileViewArno2013-03-291-0/+1
| | | | Don't open an editor in FileView when doubleclicking a file.
* Show duration in statusBarArno2013-03-221-1/+13
| | | | | Show total duration of selected Movies in FileView. Created a new class Helper::Duration for this and declared it as QMetaType.
* Remember selections on FileModel resetArno2013-03-221-0/+26
| | | | | | 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.
* Auto resize FileViewArno2013-03-201-0/+6
| | | | | Automatically resize FileView when it changes. I guess I was quite drunk on the first try. Fortunately I didn't commit it :)
* Fix ColorsArno2013-03-171-0/+2
| | | | | | | 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...
* Fix size displayArno2013-03-171-3/+1
| | | | We have the size in SmDirModel now. Use it!
* Another QFileSystemModel::FilePathRole fixArno2013-03-171-1/+1
| | | | Make hovering work again...
* Fix create FolderArno2013-03-171-6/+5
| | | | Don't let createFolder crash b/c of wrong model.
* Made CTRL++ work againArno2013-03-161-2/+5
| | | | Maybe even more intiuitive this time using unix shell globs...
* First shot at SmDirModelArno2013-03-161-2/+3
| | | | | | | | 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...
* Port to Qt5Arno2013-03-031-6/+6
| | | | | | | | * 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 :)
* Fix FrameCache and HoverWindowArno2012-03-181-1/+1
| | | | | | Another commit that should be two. While fixing FrameCache to delete invalid Pixmaps, I ventured into the depths of HoverWindow. Now it hides when focus leaves the widget we're hovering over.
* Fix some severe braindamageArno2012-03-181-0/+12
| | | | | | | | | | | | | | 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 Hotspot of X-Cursor when hoveringArno2011-04-301-1/+2
| | | | | Made Y-Offset for the cursor configurable. After switching from kwin to awesome WM the hotspot for hovering was way off.
* Bugfix for HoverWindowArno2010-12-311-0/+1
| | | | Hide HoverWindow when showing the contextMenu.
* Removed last instances of MessageDialogArno2010-12-221-60/+34
| | | | | | Removed two instances of MessageDialog from FileView and replaced them with QInputDialogs. Also got rid of the awkward doCreateFolder and doMark slots.
* Fix rename files in FSWidgetArno2010-12-181-0/+13
| | | | | | 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 hover in FileSystemWidgetArno2010-12-171-43/+67
| | | | | Hover over movies in FileSystemWidget. Make it stick to the selected hover options.
* Implement hover over moviesArno2010-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* Added ".." entry to FileViewArno2010-10-311-0/+3
| | | | | | 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()
* Performance improvement in FileViewArno2010-10-301-45/+43
| | | | | | | | | | | | | 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().
* Fix hover issuesArno2010-10-231-65/+57
| | | | | | | | | | | | | | 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.
* Fixed crash when remembering selected tab, improve performanceArno2010-10-231-63/+65
| | | | | | | | | | | 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-8/+94
| | | | | | | | | | | 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...
* Discard QDirModelArno2010-05-121-6/+6
| | | | QDirModel is deprecated by the Nokia guys. Use QFileSystemModel instead.
* Revamp actions for FilesystemWidgetArno2010-05-111-29/+2
| | | | | | | Make actions for FilesystemWidget more Qt-like. Wrapped Rename menu into an Action and got rid of the ugly findAction(). Use signal instead. Also added actions for OpenWith.
* -removed a lot of qDebug() includesam2009-11-081-1/+0
| | | | | | | -turned the Fileinformation into a QTreeview, created a model for that git-svn-id: file:///var/svn/repos2/shemov/trunk@422 f440f766-f032-0410-8965-dc7d17de2ca0
* -finished calling extractoram2009-07-151-0/+5
| | | | | | | | -QProcess doesn't work as promised in the docs, dunno how to do it yet, but we need a thread to keep the GUI responsive... -fixed some bugs with the extractionpaths git-svn-id: file:///var/svn/repos2/shemov/trunk@387 f440f766-f032-0410-8965-dc7d17de2ca0
* -implemented cover rename and templatesam2009-07-121-4/+12
| | | | | | | -started on configurationdialog git-svn-id: file:///var/svn/repos2/shemov/trunk@385 f440f766-f032-0410-8965-dc7d17de2ca0
* -implemented deleteFilesam2009-07-111-4/+30
| | | | | | | | | | -implemented refresh -implemented copyFiles -implemented moveFiles -implemented renameFiles git-svn-id: file:///var/svn/repos2/shemov/trunk@384 f440f766-f032-0410-8965-dc7d17de2ca0
* -fixed display of windowTitleam2009-07-101-1/+35
| | | | | | | | | -focus FileView after startup and changing dir via directorybar -implemented createFolder -display action in statusBar() git-svn-id: file:///var/svn/repos2/shemov/trunk@383 f440f766-f032-0410-8965-dc7d17de2ca0
* -fixed selection handlingam2009-07-101-3/+4
| | | | | | | -implemented proper window titles (not yet working) git-svn-id: file:///var/svn/repos2/shemov/trunk@382 f440f766-f032-0410-8965-dc7d17de2ca0
* -added statusbar and no. of selected filesam2009-07-091-0/+4
| | | | git-svn-id: file:///var/svn/repos2/shemov/trunk@381 f440f766-f032-0410-8965-dc7d17de2ca0
* -added messagedialogam2009-07-081-0/+45
| | | | | | | -worked on keyboard navigation and selecting items, items can now be selected like in mc git-svn-id: file:///var/svn/repos2/shemov/trunk@380 f440f766-f032-0410-8965-dc7d17de2ca0
* -fixed showing tree in fileviewam2009-07-061-4/+0
| | | | | | | -when a movie or image is activated, it's shown in the configured viewer git-svn-id: file:///var/svn/repos2/shemov/trunk@379 f440f766-f032-0410-8965-dc7d17de2ca0
* -implemented sorting in fileviewam2009-07-061-0/+15
| | | | | | | -implemented location bar git-svn-id: file:///var/svn/repos2/shemov/trunk@378 f440f766-f032-0410-8965-dc7d17de2ca0
* -added some artworkam2009-07-061-0/+30
-started implementing FilesystemView git-svn-id: file:///var/svn/repos2/shemov/trunk@377 f440f766-f032-0410-8965-dc7d17de2ca0