![]() |
Home · All Namespaces · All Classes |
#include <volumebarwindow.h>


Public Member Functions | |
| VolumeBarWindow (QWidget *parent=0) | |
| Constructs a new VolumeBarWindow instance. | |
| ~VolumeBarWindow () | |
| Destructs a VolumeBarWindow instance. | |
The VolumeBarWindow allows to display a volume-bar based on current-volume on hardware-volume-key presses and lets user to modify the volume by touching the full-screen VolumeBar widget...
Definition at line 42 of file volumebarwindow.h.
| VolumeBarWindow::VolumeBarWindow | ( | QWidget * | parent = 0 |
) |
Constructs a new VolumeBarWindow instance.
Definition at line 26 of file volumebarwindow.cpp.
00026 : 00027 MWindow (parent), 00028 logic (new VolumeBarLogic), 00029 volumeBar (0), 00030 overlay (0), 00031 #ifdef HAVE_QMSYSTEM 00032 hwkeys (0), 00033 #endif 00034 locked (false) 00035 { 00036 #ifdef HAVE_QMSYSTEM 00037 hwkeys = new MeeGo::QmKeys (this); 00038 locks = new MeeGo::QmLocks (this); 00039 00040 connect (locks, SIGNAL (stateChanged(MeeGo::QmLocks::Lock, MeeGo::QmLocks::State)), 00041 SLOT (locksChanged(MeeGo::QmLocks::Lock, MeeGo::QmLocks::State))); 00042 #endif 00043 00044 #ifdef HAVE_LIBRESOURCEQT 00045 hwkeyResource = new ResourcePolicy::ResourceSet ("event"); 00046 hwkeyResource->setAlwaysReply (); 00047 00048 ResourcePolicy::ScaleButtonResource *volumeKeys = new ResourcePolicy::ScaleButtonResource; 00049 00050 hwkeyResource->addResourceObject (volumeKeys); 00051 00052 connect (hwkeyResource, SIGNAL (resourcesGranted (QList<ResourcePolicy::ResourceType>)), 00053 this, SLOT (hwKeyResourceAcquired ())); 00054 connect (hwkeyResource, SIGNAL (lostResources ()), 00055 this, SLOT (hwKeyResourceLost ())); 00056 00057 hwkeyResource->acquire (); 00058 #endif 00059 00060 // create the VolumeBar widget 00061 volumeBar = new VolumeBar; 00062 connect (volumeBar, SIGNAL (volumeChanged (int)), SLOT (volumeBarChanged (int))); 00063 connect (volumeBar, SIGNAL (animationsFinished ()), SLOT (hide ())); 00064 00065 connect (this, SIGNAL (orientationChangeFinished(M::Orientation)), 00066 volumeBar, SLOT (updateContents ())); 00067 00068 // create&set-up an overlay 00069 overlay = new MOverlay; 00070 overlay->setWidget (volumeBar); 00071 00072 // create a scenemanager and show the overlay 00073 setSceneManager (new MSceneManager); 00074 sceneManager ()->appearSceneWindow (overlay); 00075 00076 // and set the window attributes 00077 setTranslucentBackground (true); 00078 setAttribute (Qt::WA_X11NetWmWindowTypeNotification, true); 00079 setAttribute (Qt::WA_X11DoNotAcceptFocus, true); 00080 setObjectName ("VolumeBarWindow"); 00081 setProperty("followsCurrentApplicationWindowOrientation", true); 00082 }
| VolumeBarWindow::~VolumeBarWindow | ( | ) |
Destructs a VolumeBarWindow instance.
Definition at line 84 of file volumebarwindow.cpp.
| Copyright © 2010 Nokia Corporation | Generated on Wed Nov 10 16:05:14 2010 Doxygen 1.6.1 |
MeeGo Touch |