bool AALabelEventFilter::eventFilter (QObject*, QEvent *event) { if (event->type () != QEvent::MouseButtonRelease) return false; ShowAlbumArt (Getter_ (), static_cast<QMouseEvent*> (event)->pos ()); return true; }
// main dialog constructor MusikFrame::MusikFrame() : wxFrame( (wxFrame*)NULL, -1, MUSIKAPPNAME_VERSION, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL | wxCLIP_CHILDREN ) { //--- pointer to main dialog, defined in MusikGlobals ---// g_MusikFrame = this; //--- prevent destroying saved placement info while constructing the frame ---// g_DisablePlacement = true; //--- icon ---// #ifdef __WXMSW__ SetIcon( wxICON( musicbox ) ); #endif #ifdef __WXGTK__ SetIcon( wxIcon(tray_xpm) ); #endif #ifdef wxHAS_TASK_BAR_ICON if(wxGetApp().Prefs.bDisableTrayIcon) m_pTaskBarIcon = NULL; else m_pTaskBarIcon = new MusikTaskBarIcon(this); #endif #ifdef __WXMAC__ MacSetMetalAppearance(true); #endif //--- colours ---// // this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ) ); //--- load image lists and fonts ---// LoadImageLists(); GetFonts(); //-------------------------// //--- initialize sizers ---// //-------------------------// m_pBottomPanel = new BottomPanel(this); m_pBottomPanel->SetDefaultSize(wxSize(1000,70)); m_pBottomPanel->SetAlignment(wxGetApp().Prefs.bShowNowPlayingControlOnTop == true ? wxLAYOUT_TOP : wxLAYOUT_BOTTOM); m_pBottomPanel->SetOrientation(wxLAYOUT_HORIZONTAL); //----------------// //--- playlist ---// //----------------// g_PlaylistBox = new CPlaylistBox( this ); GetListCtrlFont(); //---------------// //--- sources ---// //---------------// g_SourcesCtrl = new CSourcesBox( this ); g_SourcesCtrl->SetSashVisible(wxSASH_RIGHT, true); g_SourcesCtrl->SetDefaultSize(wxSize(wxGetApp().Prefs.nSourceBoxWidth,1000)); g_SourcesCtrl->SetAlignment(wxLAYOUT_LEFT); g_SourcesCtrl->SetOrientation(wxLAYOUT_VERTICAL); g_SourcesCtrl->SetSashBorder(wxSASH_RIGHT, true); g_SourcesCtrl->SetSashBorder(wxSASH_RIGHT, true); g_SourcesCtrl->SetDefaultBorderSize(3); g_SourcesCtrl->SetExtraBorderSize(1); //---------------------// //--- activity area ---// //---------------------// g_ActivityAreaCtrl = new CActivityAreaCtrl( this ); g_ActivityAreaCtrl->SetSashVisible(wxSASH_BOTTOM, true); g_ActivityAreaCtrl->SetDefaultSize(wxSize(1000,wxGetApp().Prefs.nActivityCtrlHeight)); g_ActivityAreaCtrl->SetAlignment(wxLAYOUT_TOP); g_ActivityAreaCtrl->SetOrientation(wxLAYOUT_HORIZONTAL); g_ActivityAreaCtrl->SetSashBorder(wxSASH_BOTTOM, true); g_ActivityAreaCtrl->SetDefaultBorderSize(3); g_ActivityAreaCtrl->SetExtraBorderSize(1); //--- taylor ui ---// ShowPlaylistInfo(); ShowSources(); ShowAlbumArt(); SetStayOnTop(( bool )wxGetApp().Prefs.bStayOnTop); CreateMainMenu(); //--- restore placement or use defaults ---// g_DisablePlacement = false; wxGetApp().Player.SetPlaymode(wxGetApp().Prefs.ePlaymode); //--- update database information, then set sound volume ---// wxGetApp().Player.SetVolume(); wxGetApp().Player.Connect(wxEVT_MUSIKPLAYER_SONG_CHANGED,MusikPlayerEventHandler(MusikFrame::OnSongChanged),NULL,this); wxGetApp().Player.Connect(wxEVT_MUSIKPLAYER_PLAY_STOP,MusikPlayerEventHandler(MusikFrame::OnPlayStop),NULL,this); SetTitle(); SetSongInfoText(MUSIKAPPNAME); SetActiveThread( NULL ); #ifdef __WXMSW__ SetMMShellHook((HWND)GetHWND()); #endif #ifdef __WXGTK__ XF86AudioKeyGrab_init(); #endif }