Changeset 40


Ignore:
Timestamp:
01/06/08 17:37:58 (4 years ago)
Author:
sander
Message:

About dialog added

Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • QtMPC.pro

    r37 r40  
    1717        gui/musiclibrarymodel.h \ 
    1818        gui/playlisttablemodel.h \ 
     19        gui/about_dialog.h \ 
    1920        gui/preferences_dialog.h \ 
    2021        lib/mpdconnection.h \ 
     
    2425 
    2526FORMS += gui/main_window.ui \ 
     27        gui/about_dialog.ui \ 
    2628        gui/preferences_dialog.ui 
    2729 
     
    3133        gui/musiclibrarymodel.cpp \ 
    3234        gui/playlisttablemodel.cpp \ 
     35        gui/about_dialog.cpp \ 
    3336        gui/preferences_dialog.cpp \ 
    3437        lib/mpdconnection.cpp \ 
  • gui/main_window.cpp

    r39 r40  
    66#include "main_window.h" 
    77#include "preferences_dialog.h" 
     8#include "about_dialog.h" 
    89 
    910MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) 
     
    5354    // GUI 
    5455    connect(action_Preferences, SIGNAL(triggered(bool)), this, SLOT(showPreferencesDialog())); 
     56    connect(action_About, SIGNAL(triggered(bool)), this, SLOT(showAboutDialog())); 
    5557    connect(volumeSlider, SIGNAL(sliderPressed()), this, SLOT(volumeSliderPressed())); 
    5658    connect(volumeSlider, SIGNAL(sliderReleased()), this, SLOT(setVolume())); 
     
    132134    connect(&pref, SIGNAL(systemTraySet(bool)), trayIcon, SLOT(setVisible(bool))); 
    133135    pref.exec(); 
     136} 
     137 
     138void MainWindow::showAboutDialog() 
     139{ 
     140    AboutDialog about(this); 
     141    about.exec(); 
    134142} 
    135143 
  • gui/main_window.h

    r38 r40  
    4747    private slots: 
    4848        void showPreferencesDialog(); 
     49        void showAboutDialog(); 
    4950        void volumeSliderPressed(); 
    5051        void volumeSliderReleased(); 
  • gui/main_window.ui

    r38 r40  
    418418    <addaction name="action_Preferences" /> 
    419419   </widget> 
     420   <widget class="QMenu" name="menu_Help" > 
     421    <property name="title" > 
     422     <string>&amp;Help</string> 
     423    </property> 
     424    <addaction name="action_About" /> 
     425   </widget> 
    420426   <addaction name="menu_File" /> 
    421427   <addaction name="menu_Edit" /> 
     428   <addaction name="menu_Help" /> 
    422429  </widget> 
    423430  <widget class="QStatusBar" name="statusbar" /> 
     
    432439   </property> 
    433440  </action> 
     441  <action name="action_About" > 
     442   <property name="text" > 
     443    <string>&amp;About</string> 
     444   </property> 
     445  </action> 
    434446 </widget> 
    435447 <resources/> 
Note: See TracChangeset for help on using the changeset viewer.