Results 1 to 10 of 10

Thread: An app is hearing you?

  1. #1
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Cool An app is hearing you?

    If, like me, you follow KDE-related blogs through Akregator (any other feed reader would work as well but Akregator add these feed by default ) you may have spotted this article about ears.

    I tried the code, palyed with it a little and liked the idea so much that I decided to do some enhancements. I thus removed references to KDE, added header facilities, implemented auto-hiding, made the ear ("external dock" if you prefer) a little nicer by using a QFrame (but still frameless window...) and finally cleaned the code a little and documented it.

    The result of my experiments is available in a small package with a very (too?) simple example : http://edyuk.tuxfamily.org/misc/kulak-qt.tar.gz
    Current Qt projects : QCodeEdit, RotiDeCode

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: An app is hearing you?

    Just curious, what happens when main window is maximized?
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: An app is hearing you?

    Quote Originally Posted by jpn View Post
    Just curious, what happens when main window is maximized?
    I've not played with that yet but I guess there would be a few options :
    • Hiding the so-called "Kulak" widget
    • Detaching it (would behave just like a detached dock)
    • Attach it within a dock widget (and hiding the title bar)
    But maybe you have a better idea ?
    Current Qt projects : QCodeEdit, RotiDeCode

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: An app is hearing you?

    Is the "ear" animated? If not, then why?

  5. #5
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: An app is hearing you?

    Quote Originally Posted by wysota View Post
    Is the "ear" animated? If not, then why?
    Because I'm not experienced enough to play with animation.... I must also admit that I'm way too lazy and currently kept busy by other tasks...
    Anyway nothing prevents a Guru like you from adding the proper code...
    Current Qt projects : QCodeEdit, RotiDeCode

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: An app is hearing you?

    Quote Originally Posted by fullmetalcoder View Post
    Anyway nothing prevents a Guru like you from adding the proper code
    1. I don't consider myself a guru
    2. Do you think I'm not limited by time?

  7. #7
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: An app is hearing you?

    1. That's what the board says, I'd tend to agree with it and I'm pretty sure many others also would...
    2. Everyone is limited on time. However, AFAIK you don't have any big projects under development ATM, do you?
    3. There is already some minimalistic animation when hiding the "ear" (smooth move to the center of the main window then hide) but it can be improved (for example gradual hiding using QWidget::setMask(). The only problem here is that I don't know how to generate a proper mask... (which value implies transparency and what's the best way to generate such a dynamic mask...)
    Current Qt projects : QCodeEdit, RotiDeCode

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: An app is hearing you?

    Quote Originally Posted by fullmetalcoder View Post
    Everyone is limited on time. However, AFAIK you don't have any big projects under development ATM, do you?
    Depends what you consider a project. Actually I have two - one is my PhD studies and responsibilities that go with it and the other is a telecom project I'm taking part in. Apart from that I have three smaller projects, all regarding Qt.

    There is already some minimalistic animation when hiding the "ear" (smooth move to the center of the main window then hide) but it can be improved (for example gradual hiding using QWidget::setMask(). The only problem here is that I don't know how to generate a proper mask... (which value implies transparency and what's the best way to generate such a dynamic mask...)
    Masking is not the way to go. I know how to make the animation as I use such thing in one of my projects. The only problem is to determine the size the widget will have when fully opened. Unfortunately, before the widget is shown for the first time, it doesn't have its size and layout determined. And that makes it hard to prepare the animation. When I manage to solve the problem with my widget, I'm sure I can write an animation effect for your widget in no time.

  9. #9
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: An app is hearing you?

    Quote Originally Posted by wysota View Post
    Depends what you consider a project. Actually I have two - one is my PhD studies and responsibilities that go with it and the other is a telecom project I'm taking part in. Apart from that I have three smaller projects, all regarding Qt.
    Beg your forgiveness... You must be quite busy indeed!

    Quote Originally Posted by wysota View Post
    Masking is not the way to go. I know how to make the animation as I use such thing in one of my projects. The only problem is to determine the size the widget will have when fully opened. Unfortunately, before the widget is shown for the first time, it doesn't have its size and layout determined. And that makes it hard to prepare the animation. When I manage to solve the problem with my widget, I'm sure I can write an animation effect for your widget in no time.
    Nice! But why wouldn't masking fit? How do you want to do gradual hiding without mask or tricky paint event??? Or are you talking about a different animation?
    Current Qt projects : QCodeEdit, RotiDeCode

  10. #10
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: An app is hearing you?

    Quote Originally Posted by wysota View Post
    Masking is not the way to go. I know how to make the animation as I use such thing in one of my projects. The only problem is to determine the size the widget will have when fully opened. Unfortunately, before the widget is shown for the first time, it doesn't have its size and layout determined. And that makes it hard to prepare the animation. When I manage to solve the problem with my widget, I'm sure I can write an animation effect for your widget in no time.
    I've just played with the concept of masking and here comes the result : http://edyuk.tuxfamily.org/misc/kula...nimated.tar.gz
    Current Qt projects : QCodeEdit, RotiDeCode

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.