Changeset 2e6b21143cb6747ed2cb62ec5a1f025dbd6ebb0b

Show
Ignore:
Timestamp:
23/09/06 15:16:33 (2 years ago)
Author:
Clément Stenac <zorglub@videolan.org>
git-committer:
Clément Stenac <zorglub@videolan.org> 1159017393 +0000
git-parent:

[19f019c7e4356c99d977430b1fc2f2ada708ee0c]

git-author:
Clément Stenac <zorglub@videolan.org> 1159017393 +0000
Message:

Advanced controls bar
Make some sttings persistent

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/qt4/Modules.am

    r3dda115 r2e6b211  
    3131    dialogs/extended \ 
    3232    dialogs/interaction \ 
    33     components/equalizer
     33    components/extended_panels
    3434    components/infopanels \ 
    3535    components/preferences_widgets \ 
     
    5757        dialogs/prefs_dialog.moc.cpp \ 
    5858        dialogs/interaction.moc.cpp \ 
    59         components/equalizer.moc.cpp \ 
     59        components/extended_panels.moc.cpp \ 
    6060        components/infopanels.moc.cpp \ 
    6161        components/preferences_widgets.moc.cpp \ 
     
    103103        dialogs/errors.cpp \ 
    104104        dialogs/interaction.cpp \ 
    105         components/equalizer.cpp \ 
     105        components/extended_panels.cpp \ 
    106106        components/infopanels.cpp \ 
    107107        components/preferences_widgets.cpp \ 
     
    131131    dialogs/prefs_dialog.hpp \ 
    132132    dialogs/interaction.hpp \ 
    133     components/equalizer.hpp \ 
     133    components/extended_panels.hpp \ 
    134134    components/infopanels.hpp \ 
    135135    components/preferences_widgets.hpp \ 
  • modules/gui/qt4/components/interface_widgets.cpp

    rd3a4dc8 r2e6b211  
    3131#include <vlc/vout.h> 
    3232 
     33#include <QLabel> 
     34#include <QSpacerItem> 
    3335#include <QCursor> 
    3436#include <QPushButton> 
     
    155157    layout->addWidget( prevButton ); 
    156158    layout->addWidget( nextButton ); 
     159 
     160    layout->addItem( new QSpacerItem( 40,20, 
     161                              QSizePolicy::Expanding, QSizePolicy::Minimum) ); 
     162    layout->addWidget( new QLabel( qtr("Current visualization:") ) ); 
     163 
     164    current = new QLabel( qtr( "None" ) ); 
     165    layout->addWidget( current ); 
     166 
     167    BUTTONACT( prevButton, prev() ); 
     168    BUTTONACT( nextButton, next() ); 
     169 
    157170    setLayout( layout ); 
    158171    setMaximumHeight( 35 ); 
     
    160173 
    161174VisualSelector::~VisualSelector() 
     175{ 
     176} 
     177 
     178void VisualSelector::prev() 
     179{ 
     180    char *psz_new = aout_VisualPrev( p_intf ); 
     181    if( psz_new ) 
     182    { 
     183        current->setText( qfu( psz_new ) ); 
     184        free( psz_new ); 
     185    } 
     186} 
     187 
     188void VisualSelector::next() 
     189{ 
     190    char *psz_new = aout_VisualNext( p_intf ); 
     191    if( psz_new ) 
     192    { 
     193        current->setText( qfu( psz_new ) ); 
     194        free( psz_new ); 
     195    } 
     196} 
     197 
     198/********************************************************************** 
     199 * More controls 
     200 **********************************************************************/ 
     201ControlsWidget::ControlsWidget( intf_thread_t *_p_i ) : 
     202                                           QFrame( NULL ), p_intf( _p_i ) 
     203{ 
     204    QHBoxLayout *layout = new QHBoxLayout( this ); 
     205    layout->setMargin( 0 ); 
     206 
     207    slowerButton = new QPushButton( "S" ); 
     208    BUTTON_SET_ACT( slowerButton, "S", qtr("Slower" ), slower() ); 
     209    layout->addWidget( slowerButton ); 
     210    slowerButton->setMaximumWidth( 35 ); 
     211 
     212    normalButton = new QPushButton( "N" ); 
     213    BUTTON_SET_ACT( normalButton, "N", qtr("Normal rate"), normal() ); 
     214    layout->addWidget( normalButton ); 
     215    normalButton->setMaximumWidth( 35 ); 
     216 
     217    fasterButton = new QPushButton( "F" ); 
     218    BUTTON_SET_ACT( fasterButton, "F", qtr("Faster" ), faster() ); 
     219    layout->addWidget( fasterButton ); 
     220    fasterButton->setMaximumWidth( 35 ); 
     221 
     222    layout->addItem( new QSpacerItem( 100,20, 
     223                              QSizePolicy::Expanding, QSizePolicy::Minimum) ); 
     224 
     225    snapshotButton = new QPushButton( "S" ); 
     226    BUTTON_SET_ACT( snapshotButton, "S", qtr("Take a snapshot"), snapshot() ); 
     227    layout->addWidget( snapshotButton ); 
     228    snapshotButton->setMaximumWidth( 35 ); 
     229 
     230    fullscreenButton = new QPushButton( "F" ); 
     231    BUTTON_SET_ACT( fullscreenButton, "F", qtr("Fullscreen"), fullscreen() ); 
     232    layout->addWidget( fullscreenButton ); 
     233    fullscreenButton->setMaximumWidth( 35 ); 
     234} 
     235 
     236ControlsWidget::~ControlsWidget() 
     237{ 
     238} 
     239 
     240void ControlsWidget::enableInput( bool enable ) 
     241{ 
     242    slowerButton->setEnabled( enable ); 
     243    normalButton->setEnabled( enable ); 
     244    fasterButton->setEnabled( enable ); 
     245} 
     246void ControlsWidget::enableVideo( bool enable ) 
     247{ 
     248    snapshotButton->setEnabled( enable ); 
     249    fullscreenButton->setEnabled( enable ); 
     250} 
     251 
     252void ControlsWidget::slower() 
     253{ 
     254    THEMIM->getIM()->slower(); 
     255} 
     256 
     257void ControlsWidget::faster() 
     258{ 
     259    THEMIM->getIM()->faster(); 
     260} 
     261 
     262void ControlsWidget::normal() 
     263{ 
     264    THEMIM->getIM()->normalRate(); 
     265} 
     266 
     267void ControlsWidget::snapshot() 
     268{ 
     269} 
     270 
     271void ControlsWidget::fullscreen() 
    162272{ 
    163273} 
  • modules/gui/qt4/components/interface_widgets.hpp

    ra01c61f r2e6b211  
    9090private: 
    9191    intf_thread_t *p_intf; 
     92    QLabel *current; 
     93private slots: 
     94    void prev(); 
     95    void next(); 
    9296}; 
     97 
     98class QPushButton; 
     99class ControlsWidget : public QFrame 
     100{ 
     101    Q_OBJECT 
     102public: 
     103    ControlsWidget( intf_thread_t *); 
     104    virtual ~ControlsWidget(); 
     105    void enableInput( bool ); 
     106    void enableVideo( bool ); 
     107private: 
     108    intf_thread_t *p_intf; 
     109    QPushButton *slowerButton, *normalButton, *fasterButton; 
     110    QPushButton *fullscreenButton, *snapshotButton; 
     111private slots: 
     112    void faster(); 
     113    void slower(); 
     114    void normal(); 
     115    void snapshot(); 
     116    void fullscreen(); 
     117}; 
     118 
    93119 
    94120/******************** Playlist Widgets ****************/ 
  • modules/gui/qt4/dialogs/extended.cpp

    re69979b r2e6b211  
    2727#include "dialogs_provider.hpp" 
    2828#include "util/qvlcframe.hpp" 
    29 #include "components/equalizer.hpp" 
     29#include "components/extended_panels.hpp" 
    3030#include "qt4.hpp" 
    3131 
  • modules/gui/qt4/input_manager.cpp

    re69979b r2e6b211  
    5656    if( p_input ) 
    5757    { 
     58        vlc_value_t val; 
     59        var_Change( p_input, "video-es", VLC_VAR_CHOICESCOUNT, &val, NULL ); 
     60        b_has_video = val.i_int > 0; 
     61        var_Change( p_input, "audio-es", VLC_VAR_CHOICESCOUNT, &val, NULL ); 
     62        b_has_audio = val.i_int > 0; 
    5863        var_AddCallback( p_input, "audio-es", ChangeAudio, this ); 
    5964        var_AddCallback( p_input, "video-es", ChangeVideo, this ); 
     
    140145void InputManager::sliderUpdate( float new_pos ) 
    141146{ 
    142     if( p_input && !p_input->b_die && !p_input->b_dead
     147    if( hasInput()
    143148        var_SetFloat( p_input, "position", new_pos ); 
    144149} 
     
    160165    var_Set( p_input, "state", state ); 
    161166    emit statusChanged( state.i_int ); 
     167} 
     168 
     169void InputManager::slower() 
     170{ 
     171    if( hasInput() ) 
     172        var_SetVoid( p_input, "rate-slower" ); 
     173} 
     174 
     175void InputManager::faster() 
     176{ 
     177    if( hasInput() ) 
     178        var_SetVoid( p_input, "rate-faster" ); 
     179} 
     180 
     181void InputManager::normalRate() 
     182{ 
     183    if( hasInput() ) 
     184        var_SetInteger( p_input, "rate", INPUT_RATE_DEFAULT ); 
    162185} 
    163186 
  • modules/gui/qt4/input_manager.hpp

    re45f26d r2e6b211  
    2727#include <QObject> 
    2828#include <vlc/vlc.h> 
     29#include <vlc/input.h> 
    2930 
    3031class InputManager : public QObject 
     
    3637 
    3738    void delInput(); 
     39    bool hasInput() { return p_input && !p_input->b_dead && !p_input->b_die; } 
    3840    bool hasAudio() { return b_has_audio; } 
    3941    bool hasVideo() { return b_has_video; } 
     
    4951    void setInput( input_thread_t * ); ///< Our controlled input changed 
    5052    void sliderUpdate( float ); ///< User dragged the slider. We get new pos 
     53    void slower(); 
     54    void faster(); 
     55    void normalRate(); 
    5156signals: 
    5257    /// Send new position, new time and new length 
  • modules/gui/qt4/main_interface.cpp

    ra01c61f r2e6b211  
    4040#include <vlc_keys.h> 
    4141#include <vlc/vout.h> 
     42#include <aout_internal.h> 
    4243 
    4344#ifdef WIN32 
     
    4950#endif 
    5051 
    51 #define BUTTON_SET( button, image, tooltip ) ui.button##Button->setText(""); \ 
    52     ui.button##Button->setIcon( QIcon( ":/pixmaps/"#image ) ); \ 
    53     ui.button##Button->setToolTip( tooltip ); 
    54  
    5552#define VISIBLE(i) (i && i->isVisible()) 
    5653 
     
    9188    embeddedPlaylistWasActive = videoIsActive = false; 
    9289 
     90    /* Fetch configuration from settings and vlc config */ 
     91    videoEmbeddedFlag = false; 
     92    if( config_GetInt( p_intf, "embedded-video" ) ) 
     93        videoEmbeddedFlag = true; 
     94 
     95    alwaysVideoFlag = false; 
     96    if( videoEmbeddedFlag && config_GetInt( p_intf, "qt-always-video" )) 
     97        alwaysVideoFlag = true; 
     98 
     99    playlistEmbeddedFlag = settings->value( "playlist-embedded", true ). 
     100                                                                    toBool(); 
     101    advControlsEnabled= settings->value( "adv-controls", false ).toBool(); 
     102 
    93103    setWindowTitle( QString::fromUtf8( _("VLC media player") ) ); 
    94104    handleMainUi( settings ); 
    95105 
    96     QVLCMenu::createMenuBar( this, p_intf, playlistEmbeddedFlag ); 
     106    QVLCMenu::createMenuBar( this, p_intf, playlistEmbeddedFlag, 
     107                             advControlsEnabled ); 
    97108 
    98109    /* Status bar */ 
     
    127138MainInterface::~MainInterface() 
    128139{ 
    129     /// \todo Save everything 
     140    settings->setValue( "playlist-embedded", playlistEmbeddedFlag ); 
     141    settings->setValue( "adv-controls", advControlsEnabled ); 
     142    settings->setValue( "pos", pos() ); 
     143    settings->endGroup(); 
     144    delete settings; 
    130145    p_intf->b_interaction = VLC_FALSE; 
    131146    var_DelCallback( p_intf, "interaction", InteractCallback, this ); 
     
    145160    ui.hboxLayout->insertWidget( 0, slider ); 
    146161 
    147     BUTTON_SET( prev, previous.png, qtr( "Previous" ) ); 
    148     BUTTONACT( ui.prevButton, prev() ); 
    149     BUTTON_SET( next, next.png , qtr( "Next" ) ); 
    150     BUTTONACT( ui.nextButton, next() ); 
    151     BUTTON_SET( play, play.png , qtr( "Play" ) ); 
    152     BUTTONACT( ui.playButton, play() ); 
    153     BUTTON_SET( stop, stop.png , qtr( "Stop" )  ); 
    154     BUTTONACT( ui.stopButton, stop() ); 
    155  
    156     BUTTON_SET( visual,  stop.png, qtr( "Audio visualizations" ) ); 
    157     BUTTONACT( ui.visualButton, visual() ); 
     162    BUTTON_SET_ACT_I( ui.prevButton, "" , previous.png, 
     163                      qtr("Previous"), prev() ); 
     164    BUTTON_SET_ACT_I( ui.nextButton, "", next.png, qtr("Next"), next() ); 
     165    BUTTON_SET_ACT_I( ui.playButton, "", play.png, qtr("Play"), play() ); 
     166    BUTTON_SET_ACT_I( ui.stopButton, "", stop.png, qtr("Stop"), stop() ); 
     167    BUTTON_SET_ACT_I( ui.visualButton, "", stop.png, 
     168                    qtr( "Audio visualizations" ), visual() ); 
    158169 
    159170    /* Volume */ 
     
    165176    ui.volumeSlider->setFocusPolicy( Qt::NoFocus ); 
    166177 
    167     /* Fetch configuration from settings and vlc config */ 
    168     videoEmbeddedFlag = false; 
    169     if( config_GetInt( p_intf, "embedded-video" ) ) 
    170         videoEmbeddedFlag = true; 
    171  
    172     alwaysVideoFlag = false; 
    173     if( videoEmbeddedFlag && config_GetInt( p_intf, "qt-always-video" )) 
    174         alwaysVideoFlag = true; 
    175  
    176     playlistEmbeddedFlag = true; 
    177     /// \todo fetch playlist settings 
    178  
    179     BUTTON_SET( playlist, volume-low.png, playlistEmbeddedFlag ? 
    180                                                 qtr( "Show playlist" ) : 
     178    BUTTON_SET_IMG( ui.playlistButton, "" ,volume-low.png, 
     179                        playlistEmbeddedFlag ?  qtr( "Show playlist" ) : 
    181180                                                qtr( "Open playlist" ) ); 
    182181    BUTTONACT( ui.playlistButton, playlist() ); 
     
    186185 
    187186    addSize = QSize( ui.vboxLayout->margin() * 2, PREF_H ); 
     187 
     188    advControls = new ControlsWidget( p_intf ); 
     189    ui.vboxLayout->insertWidget( 0, advControls ); 
     190    advControls->updateGeometry(); 
     191    if( !advControlsEnabled ) advControls->hide(); 
     192    need_components_update = true; 
    188193 
    189194    visualSelector = new VisualSelector( p_intf ); 
     
    212217        p_intf->pf_control_window  = ::DoControl; 
    213218    } 
    214  
    215     calculateInterfaceSize(); 
    216     resize( mainSize ); 
    217  
    218219    setMinimumSize( PREF_W, addSize.height() ); 
    219220} 
     
    250251    if( VISIBLE( visualSelector ) ) 
    251252        height += visualSelector->height(); 
    252  
     253    fprintf( stderr, "Adv %p - visible %i\n", advControls, advControls->isVisible() ); 
     254    if( VISIBLE( advControls) ) 
     255    { 
     256        fprintf( stderr, "visible\n" ); 
     257        height += advControls->sizeHint().height(); 
     258    } 
     259 
     260    fprintf( stderr, "Adv height %i\n", advControls->sizeHint().height() ); 
    253261    fprintf( stderr, "Setting to %ix%i\n", 
    254262                     width + addSize.width() , height + addSize.height() ); 
     
    266274                             e->size().height()  - addSize.height() ); 
    267275        videoWidget->updateGeometry(); 
    268         fprintf( stderr, "Video set to %ix%i\n", DS( videoWidget->widgetSize) ); 
    269276    } 
    270277    if( VISIBLE( playlistWidget ) ) 
     
    273280                                 e->size().height() - addSize.height() ); 
    274281        playlistWidget->updateGeometry(); 
    275         fprintf( stderr, "PL set to %ix%i\n",DS(playlistWidget->widgetSize ) ); 
    276282    } 
    277283} 
     
    362368} 
    363369 
     370void MainInterface::advanced() 
     371{ 
     372    if( !VISIBLE( advControls ) ) 
     373    { 
     374        advControls->show(); 
     375        advControlsEnabled = true; 
     376    } 
     377    else 
     378    { 
     379        advControls->hide(); 
     380        advControlsEnabled = false; 
     381    } 
     382    doComponentsUpdate(); 
     383} 
     384 
    364385void MainInterface::visual() 
    365386{ 
     
    405426    if( VISIBLE( playlistWidget) ) 
    406427    { 
    407         fprintf( stderr, "hiding playlist\n" ); 
    408428        playlistWidget->hide(); 
    409429        if( videoIsActive ) 
     
    416436    else 
    417437    { 
    418         fprintf( stderr, "showing playlist\n" ); 
    419438        playlistWidget->show(); 
    420439        if( videoIsActive ) 
     
    449468 
    450469        menuBar()->clear(); 
    451         QVLCMenu::createMenuBar( this, p_intf, false ); 
     470        QVLCMenu::createMenuBar( this, p_intf, false, advControlsEnabled ); 
    452471 
    453472        if( videoIsActive ) 
     
    470489        playlistEmbeddedFlag = true; 
    471490        menuBar()->clear(); 
    472         QVLCMenu::createMenuBar(this, p_intf, true ); 
     491        QVLCMenu::createMenuBar(this, p_intf, true, advControlsEnabled ); 
    473492        playlist(); 
    474493    } 
     
    588607void MainInterface::updateOnTimer() 
    589608{ 
     609    aout_instance_t *p_aout = (aout_instance_t *)vlc_object_find( p_intf, 
     610                                    VLC_OBJECT_AOUT, FIND_ANYWHERE ); 
     611    /* Todo: make this event-driven */ 
     612    if( p_aout ) 
     613    { 
     614        ui.visualButton->setEnabled( true ); 
     615        vlc_object_release( p_aout ); 
     616    } 
     617    else 
     618        ui.visualButton->setEnabled( false ); 
     619 
     620    /* And this too */ 
     621    advControls->enableInput( THEMIM->getIM()->hasInput() ); 
     622    advControls->enableVideo( THEMIM->getIM()->hasVideo() ); 
     623 
    590624    if( p_intf->b_die ) 
    591625    { 
     
    635669    intf_dialog_args_t *p_arg = new intf_dialog_args_t; 
    636670    p_arg->p_dialog = (interaction_dialog_t *)(new_val.p_address); 
    637  
    638     MainInterface *p_interface = (MainInterface*)param; 
    639671    DialogEvent *event = new DialogEvent( INTF_DIALOG_INTERACTION, 0, p_arg ); 
    640672    QApplication::postEvent( THEDP, static_cast<QEvent*>(event) ); 
  • modules/gui/qt4/main_interface.hpp

    ra01c61f r2e6b211  
    4343class VolumeClickHandler; 
    4444class VisualSelector; 
     45class ControlsWidget; 
    4546 
    4647class MainInterface : public QVLCMW 
     
    7576    BackgroundWidget    *bgWidget; 
    7677    VisualSelector      *visualSelector; 
     78    ControlsWidget      *advControls; 
    7779    PlaylistWidget      *playlistWidget; 
    7880 
     
    8082    bool                 videoEmbeddedFlag; 
    8183    bool                 alwaysVideoFlag; 
     84    bool                 advControlsEnabled; 
    8285 
    8386    InputManager        *main_input_manager; 
     
    102105    void playlist(); 
    103106    void visual(); 
     107    void advanced(); 
    104108    void updateVolume( int sliderVolume ); 
    105109}; 
  • modules/gui/qt4/menus.cpp

    ra01c61f r2e6b211  
    121121 
    122122void QVLCMenu::createMenuBar( MainInterface *mi, intf_thread_t *p_intf, 
    123                               bool playlist
     123                              bool playlist, bool adv_controls_enabled
    124124{ 
    125125    QMenuBar *bar = mi->menuBar(); 
    126     BAR_ADD( FileMenu(), qtr("File") ); 
     126    BAR_ADD( FileMenu(), qtr("Media") ); 
    127127    if( playlist ) 
    128128    { 
    129129        BAR_ADD( PlaylistMenu( mi,p_intf ), qtr("Playlist" ) ); 
    130130    } 
    131     BAR_ADD( ToolsMenu( p_intf ), qtr("Tools") ); 
     131    BAR_ADD( ToolsMenu( p_intf, mi, adv_controls_enabled ), qtr("Tools") ); 
    132132    BAR_DADD( VideoMenu( p_intf, NULL ), qtr("Video"), 1 ); 
    133133    BAR_DADD( AudioMenu( p_intf, NULL ), qtr("Audio"), 2 ); 
     
    162162} 
    163163 
    164 QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, bool with_intf ) 
     164QMenu *QVLCMenu::ToolsMenu( intf_thread_t *p_intf, MainInterface *mi, 
     165                            bool adv_controls_enabled, bool with_intf ) 
    165166{ 
    166167    QMenu *menu = new QMenu(); 
     
    170171        intfmenu->setTitle( qtr("Interfaces" ) ); 
    171172        menu->addMenu( intfmenu ); 
    172         /** \todo ADD EXT GUI HERE */ 
    173173        menu->addSeparator(); 
    174174    } 
     
    176176    DP_SADD( qtr("Information") , "", "", streaminfoDialog() ); 
    177177    DP_SADD( qtr("Bookmarks"), "", "", bookmarksDialog() ); 
     178    DP_SADD( qtr("Extended settings"), "","",extendedDialog() ); 
     179    if( mi ) 
     180    { 
     181        menu->addSeparator(); 
     182        QAction *adv = menu->addAction( qtr("Advanced controls" ), 
     183                                        mi, SLOT( advanced() ) ); 
     184        adv->setCheckable( true ); 
     185        if( adv_controls_enabled ) adv->setChecked( true ); 
     186    } 
    178187    menu->addSeparator(); 
    179188    DP_SADD( qtr("Preferences"), "", "", prefsDialog() ); 
    180     DP_SADD( qtr("Extended"), "","",extendedDialog() ); 
    181189    return menu; 
    182190} 
     
    341349    menu->addMenu( intfmenu ); \ 
    342350    \ 
    343     QMenu *toolsmenu = ToolsMenu( p_intf, false ); \ 
     351    QMenu *toolsmenu = ToolsMenu( p_intf, NULL, false, false ); \ 
    344352    toolsmenu->setTitle( qtr("Tools" ) ); \ 
    345353    menu->addMenu( toolsmenu ); \ 
  • modules/gui/qt4/menus.hpp

    ra01c61f r2e6b211  
    5959    Q_OBJECT; 
    6060public: 
    61     static void createMenuBar( MainInterface *mi, intf_thread_t *, bool ); 
     61    static void createMenuBar( MainInterface *mi, intf_thread_t *, bool, bool ); 
    6262 
    6363    /* Menus */ 
     
    6565    static QMenu *SDMenu( intf_thread_t * ); 
    6666    static QMenu *PlaylistMenu( MainInterface *, intf_thread_t *); 
    67     static QMenu *ToolsMenu( intf_thread_t *, bool with_intf = true ); 
     67    static QMenu *ToolsMenu( intf_thread_t *, MainInterface *, bool, 
     68                             bool with = true ); 
    6869    static QMenu *NavigMenu( intf_thread_t * , QMenu * ); 
    6970    static QMenu *VideoMenu( intf_thread_t * , QMenu * ); 
  • modules/gui/qt4/qt4.hpp

    ra01c61f r2e6b211  
    6363#define ON_TIMEOUT( act ) CONNECT( THEDP->fixed_timer, timeout(), this, act ) 
    6464 
     65#define BUTTON_SET( button, text, tooltip ) \ 
     66    button->setText( text ); \ 
     67    button->setToolTip( tooltip ); 
     68 
     69#define BUTTON_SET_ACT( button, text, tooltip, thisslot ) \ 
     70    BUTTON_SET( button, text, tooltip ); \ 
     71    BUTTONACT( button, thisslot ); 
     72 
     73#define BUTTON_SET_IMG( button, text, image, tooltip ) \ 
     74    BUTTON_SET( button, text, tooltip ); \ 
     75    button->setIcon( QIcon( ":/pixmaps/"#image ) ); 
     76 
     77#define BUTTON_SET_ACT_I( button, text, image, tooltip, thisslot ) \ 
     78    BUTTON_SET_IMG( button, text, image, tooltip ); \ 
     79    BUTTONACT( button, thisslot ); 
     80 
    6581static int DialogEvent_Type = QEvent::User + 1; 
    6682static int PLUndockEvent_Type = QEvent::User + 2;