[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_3_BRANCH: kdemultimedia/kmix
From:       Helio Chissini de Castro <helio () conectiva ! com ! br>
Date:       2004-11-23 21:07:48
Message-ID: 20041123210748.36D6918CF2 () office ! kde ! org
[Download RAW message or body]

CVS commit by helio: 

Backport:
- Popup frame patch by Zack Rusin


  A            KMixApp.cpp   1.6.2.3 [LGPL (v2+)]
  A            kmix.cpp   1.185.2.4 [LGPL (v2+)]
  A            mixer_oss.cpp   1.37.2.3 [LGPL (v2+)]
  M +1 -6      kmixdockwidget.cpp   1.52.2.3
  M +12 -14    viewdockareapopup.cpp   1.6.2.2
  M +2 -1      viewdockareapopup.h   1.4.2.2


--- kdemultimedia/kmix/kmixdockwidget.cpp  #1.52.2.2:1.52.2.3
@@ -95,9 +95,4 @@ KMixDockWidget::createMasterVolWidget()
    if ( _playBeepOnVolumeChange ) {
         _audioPlayer = new KAudioPlayer("KDE_Beep_Digital_1.ogg");
-        // !! it would be better to connect the MixDevice, but it is not yet \
                implemented
-        connect(_dockAreaPopup->getMdwHACK(),
-                SIGNAL(newVolume(int, Volume)),
-                _audioPlayer,
-                SLOT(play()));
    }
 }
@@ -214,5 +209,5 @@ KMixDockWidget::mousePressEvent(QMouseEv
                 _dockAreaPopup->move(x, y);  // so that the mouse is outside of the \
widget  _dockAreaPopup->show();
-                KWin::setState(_dockAreaPopup->winId(), NET::StaysOnTop | \
NET::Sticky | NET::SkipTaskbar | NET::SkipPager); +                \
KWin::setState(_dockAreaPopup->winId(), NET::StaysOnTop | NET::SkipTaskbar | \
NET::SkipPager );  
                 QWidget::mousePressEvent(me); // KSystemTray's shouldn't do the \
default action for this

--- kdemultimedia/kmix/viewdockareapopup.cpp  #1.6.2.1:1.6.2.2
@@ -26,4 +26,5 @@
 #include <qevent.h>
 #include <qlayout.h>
+#include <qframe.h>
 #include <qpushbutton.h>
 
@@ -42,5 +43,12 @@ ViewDockAreaPopup::ViewDockAreaPopup(QWi
       : ViewBase(parent, name, mixer, WStyle_Customize | WType_Popup & \
WStyle_NoBorder, vflags), _dock(dockW)  {
-    _layoutMDW = new QGridLayout( this, 1, 1, 2, 1, "KmixPopupLayout" );
+    QBoxLayout *layout = new QHBoxLayout( this );
+    _frame = new QFrame( this );
+    layout->addWidget( _frame );
+
+    _frame->setFrameStyle( QFrame::PopupPanel | QFrame::Raised );
+    _frame->setLineWidth( 1 );
+
+    _layoutMDW = new QGridLayout( _frame, 1, 1, 2, 1, "KmixPopupLayout" );
     init();
 }
@@ -53,4 +61,5 @@ ViewDockAreaPopup::~ViewDockAreaPopup() 
 void ViewDockAreaPopup::mousePressEvent(QMouseEvent *)
 {
+        kdDebug() << "Teste pres mouse" << endl;
     /**
        Hide the popup:
@@ -102,5 +111,5 @@ QWidget* ViewDockAreaPopup::add(MixDevic
                             false,        // Small
                             Qt::Vertical, // Direction: only 1 device, so doesn't \
                matter
-                            this,         // parent
+                            _frame,       // parent
                             0,            // Is "NULL", so that there is no \
RMB-popup  _dockDevice->name().latin1() );
@@ -110,5 +119,5 @@ QWidget* ViewDockAreaPopup::add(MixDevic
 
          // Add button to show main panel
-         _showPanelBox = new QPushButton( i18n("Mixer"), this, "MixerPanel" );
+         _showPanelBox = new QPushButton( i18n("Mixer"), _frame, "MixerPanel" );
          connect ( _showPanelBox, SIGNAL( clicked() ), SLOT( showPanelSlot() ) );
     _layoutMDW->addMultiCellWidget( _showPanelBox, 1, 1, 0, 2 );
@@ -184,15 +193,4 @@ void ViewDockAreaPopup::showPanelSlot() 
 }
 
-
-// @todo REMOVE THIS after MixDevice can signal "volumeChanged()"
-//       But this method is only used by the currently disabled
-//       "play-beep-on-volume-change method".
-//       Hint: That one should rather be moved here.
-MixDeviceWidget* ViewDockAreaPopup::getMdwHACK() {
-   return _mdw;
-}
-
-
-
 #include "viewdockareapopup.moc"
 

--- kdemultimedia/kmix/viewdockareapopup.h  #1.4.2.1:1.4.2.2
@@ -13,4 +13,5 @@ class KMixDockWidget;
 class MixDeviceWidget;
 class MixDevice;
+class QFrame;
 
 class ViewDockAreaPopup : public ViewBase
@@ -31,5 +32,4 @@ public:
 
     QSize sizeHint() const;
-    MixDeviceWidget* getMdwHACK();
 
 protected:
@@ -42,4 +42,5 @@ protected:
 private:
     QGridLayout* _layoutMDW;
+    QFrame *_frame;
 
 private slots:


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic