Let’s introduce: The Previewer

Hello everybody! This is my first post here and I’d like to show you what I’m hacking on currently. Its amazing name (Previewer “so-obvious” 😛 ) suggests what it is supposed to do. It previews your files. Just drag and drop them on it and it will open them in a small dialog to show you the contents. Simple and (hope) useful.

But let there be pictures:

image drag

As you can see here, just drag the file on the plasmoid and it will preview:

image preview

Simple, huh? =)

Btw I think it’s more useful having some text instead of images previewed on your plasmoid. Then drag your text file and see the result =)

some text previewed

Your text appears (ReadOnly) and you can keep it always visible since the dialog stays always on top!

I’m working on this behavior since someone (friedrich| in #plasma =) ) suggested me to make it optional: choose whether the dialog should be always on top or not.

Ok, moreover, the plasmoid keeps track of your last previewed files. Just right click the icon:

recent actions

Well, since this plasmoid makes use of KParts technology, you can preview everything which is supposed to be opened by the Part technology. So you can have also a preview for your pdf files =)

pdf preview

And last but not least, this plasmoid becomes more useful if moved in the panel =) You can drag urls on it while you are using your pc and have a small preview dialog at the bottom corners of your screen:use in panel

Since the dialog has no borders, the resize was not natively supported. However I hacked around finding a temporary (or maybe definitive) solution and coded allowing its resizing just scrolling your mouse wheel on it. I also added the chance of moving it on the screen! =)

You can have a look at http://websvn.kde.org/trunk/playground/base/plasma/applets/previewer/ for updated sources or even click on www.kde-look.org and look for Previewer plasmoid. Download and test =)

Comments are really really welcome!



22 Responses to “Let’s introduce: The Previewer”

  1. 1 Thales July 4, 2008 at 6:17 pm

    Great work, dude!

    Any chance of integrating this into Dolphin (somewhat like quicklook for mac)?

  2. 2 notmart July 4, 2008 at 6:20 pm

    well done dude, well done 🙂
    and welcome into planet eheh 🙂

  3. 3 Alessandro Diaferia July 4, 2008 at 6:29 pm

    Thales: your hint is great. I’ll investigate to make something similar (hope) =).

    notmart: Thanks a lot!! =) (grazie Marco!!)

  4. 4 Oliver July 4, 2008 at 7:05 pm

    Oh what a great idea! This is very usefull IMHO. Hope to see it ready soon. KDE4 rocks! I guess I will love the panel thingy!

    Is there something similar on any other DE (even on any OS)?

  5. 5 Oliver July 4, 2008 at 7:12 pm

    I forgot one question. What about moving images or sound? Will there also be a preview?

    (I guess “yes with a little work, since it uses kparts”.)


  6. 6 Alessandro Diaferia July 4, 2008 at 7:17 pm

    Oliver: you can preview images… and sounds since KPlayer (iirc) gives a part for sounds =)

  7. 7 Oliver July 4, 2008 at 7:24 pm

    Thanks for answering my question. Not sure if it will be kplayer part on my system but … .

    Keep up the excellent work.


  8. 8 Jens July 4, 2008 at 7:48 pm

    This is nice, but I think for many usecases (images,textfiles) even more nicer would be a preview on hover-function like in konqueror for kde-3.x.

  9. 9 randomguy3 July 4, 2008 at 7:57 pm

    Me likes. A drag-and-drop KPart viewer will be very useful…

  10. 10 David July 4, 2008 at 8:16 pm

    is/will it be possible to open more than on file at a time, maybe drag the preview dialogs around?

    i think further integration with dolphin would be great, maybe double-click the preview in dolphin’s sidebar to open this?

    thank you for this. i’ll try it out now 🙂

  11. 11 Nookie July 4, 2008 at 9:01 pm


    I love your applet.

    I wonder have you maybe seen Leopard OSX preview.
    You need to press there only space on the file and it will preview
    the file.

    Do you think you could maybe recode you application instead of draging and dropping to just hit space button when you have selected the file and then it should preview the file.

    Good Luck & Great Work.

  12. 12 David July 4, 2008 at 10:36 pm

    Ooh. This looks very nifty.

    My only complaint is that the text is not the correct color and is hard to read, etc. Would perhaps calling setPalette() on the widget with Plasma’s palette be enough? (This would also be nice in that theme writers and KPart writers would notice mistakes in their apps w.r.t dark color schemes sooner as Plasma’s default is dark.)

  13. 13 Sébastien Noël July 5, 2008 at 1:28 am

    This is a really nice and welcomed idea. Now we are talking about getting the computer to help us work!

    Thanks for your great work and keep up!

  14. 14 Kooji July 5, 2008 at 6:13 am

    Wow! Welcome to Planet KDE! You are full of potential.

    I agree with Nookie. Using a single-key instead of dragging and dropping would be much easier. But I would use Previewer anyway.

  15. 16 Paul July 5, 2008 at 12:54 pm

    A great plasmoid, very handy! Keep up the nice work!

    p.s. Son contento di essere Italiano!

  16. 17 robert July 5, 2008 at 3:41 pm

    definately a cool idea. i should tell you that my main though while reading your post was ‘… doesn’t kde 3.5 do this OnHover?’

    i think your primary focus should be implementing this functionality from within applications (firefox, konqueror, maybe even konsole), invoking your previewer plasmoid by either hovering, selecting a right-click menu option, of pressing a key while clicking. the previews could appear as they did in kde3.5, right about the area of the hovered over file, or off to the side, perhaps from the menu bar.

    as for how i use my system, the desktop is rarely visible. one of my first thoughts was that i’d never ever use your tool just because it would always be out reach. dragging files to the tool seemed like way too much effort.

    just my two cents. take em or leave em.

  17. 18 Jeroen July 5, 2008 at 4:49 pm

    Looks great!
    I agree with Nookie. Would be nice to have it integrated with Dolphin (or even all KDE) and accessible with a simple shortcut.

    Keep up the good work 🙂

  18. 19 Alessandro Diaferia July 5, 2008 at 4:55 pm

    Thank you so mych for your spread of ideas. I do appreciate it a lot! Since the most asked feature is to have integration with other apps I started working on creating a DBus interface to allow calling my plasmoid from almost everywhere. So stay tuned for this, I’ll write a post also about this soon! =)


  19. 20 Kyle Cunningham July 5, 2008 at 11:01 pm

    Sounds awesome, I am hoping this lands in KDE4.2!

  20. 21 Alessandro Diaferia July 6, 2008 at 8:03 pm

    Kyle Cunningham: this plasmoid is planned to be included in kdeplasmoids for 4.2 =)

  21. 22 markus July 12, 2008 at 4:25 pm

    OMG, what a great idea!
    This solves a whole lot of usability issues I have with desktops in a very smart way!
    Things like this are the reason I recently switched to Linux and KDE!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s



%d bloggers like this: