profile window management
This commit is contained in:
parent
928cf8196e
commit
09cbb9d2ab
2 changed files with 32 additions and 1 deletions
|
@ -39,7 +39,8 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
|
|||
ClientSettingsDlg ( pNCliP, parent, Qt::Window ),
|
||||
ChatDlg ( parent, Qt::Window ),
|
||||
ConnectDlg ( bNewShowComplRegConnList, parent, Qt::Dialog ),
|
||||
AnalyzerConsole ( pNCliP, parent, Qt::Window )
|
||||
AnalyzerConsole ( pNCliP, parent, Qt::Window ),
|
||||
MusicianProfileDlg ( pNCliP, parent )
|
||||
{
|
||||
setupUi ( this );
|
||||
|
||||
|
@ -292,6 +293,9 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
|
|||
pViewMenu->addAction ( tr ( "&Connection Setup..." ), this,
|
||||
SLOT ( OnOpenConnectionSetupDialog() ) );
|
||||
|
||||
pViewMenu->addAction ( tr ( "My &Profile..." ), this,
|
||||
SLOT ( OnOpenMusicianProfileDialog() ) );
|
||||
|
||||
pViewMenu->addAction ( tr ( "C&hat..." ), this,
|
||||
SLOT ( OnOpenChatDialog() ) );
|
||||
|
||||
|
@ -414,6 +418,17 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
|
|||
ShowChatWindow();
|
||||
}
|
||||
|
||||
// musician profile window
|
||||
if ( !pClient->vecWindowPosProfile.isEmpty() && !pClient->vecWindowPosProfile.isNull() )
|
||||
{
|
||||
MusicianProfileDlg.restoreGeometry ( pClient->vecWindowPosProfile );
|
||||
}
|
||||
|
||||
if ( pClient->bWindowWasShownProfile )
|
||||
{
|
||||
ShowMusicianProfileDialog();
|
||||
}
|
||||
|
||||
// connection setup window
|
||||
if ( !pClient->vecWindowPosConnect.isEmpty() && !pClient->vecWindowPosConnect.isNull() )
|
||||
{
|
||||
|
@ -573,15 +588,18 @@ void CClientDlg::closeEvent ( QCloseEvent* Event )
|
|||
pClient->vecWindowPosMain = saveGeometry();
|
||||
pClient->vecWindowPosSettings = ClientSettingsDlg.saveGeometry();
|
||||
pClient->vecWindowPosChat = ChatDlg.saveGeometry();
|
||||
pClient->vecWindowPosProfile = MusicianProfileDlg.saveGeometry();
|
||||
pClient->vecWindowPosConnect = ConnectDlg.saveGeometry();
|
||||
|
||||
pClient->bWindowWasShownSettings = ClientSettingsDlg.isVisible();
|
||||
pClient->bWindowWasShownChat = ChatDlg.isVisible();
|
||||
pClient->bWindowWasShownProfile = MusicianProfileDlg.isVisible();
|
||||
pClient->bWindowWasShownConnect = ConnectDlg.isVisible();
|
||||
|
||||
// if settings/connect dialog or chat dialog is open, close it
|
||||
ClientSettingsDlg.close();
|
||||
ChatDlg.close();
|
||||
MusicianProfileDlg.close();
|
||||
ConnectDlg.close();
|
||||
AnalyzerConsole.close();
|
||||
|
||||
|
@ -867,6 +885,16 @@ void CClientDlg::ShowConnectionSetupDialog()
|
|||
ConnectDlg.activateWindow();
|
||||
}
|
||||
|
||||
void CClientDlg::ShowMusicianProfileDialog()
|
||||
{
|
||||
// show musician profile dialog
|
||||
MusicianProfileDlg.show();
|
||||
|
||||
// make sure dialog is upfront and has focus
|
||||
MusicianProfileDlg.raise();
|
||||
MusicianProfileDlg.activateWindow();
|
||||
}
|
||||
|
||||
void CClientDlg::ShowGeneralSettings()
|
||||
{
|
||||
// open general settings dialog
|
||||
|
|
|
@ -81,6 +81,7 @@ protected:
|
|||
void SetGUIDesign ( const EGUIDesign eNewDesign );
|
||||
void SetMyWindowTitle ( const int iNumClients );
|
||||
void ShowConnectionSetupDialog();
|
||||
void ShowMusicianProfileDialog();
|
||||
void ShowGeneralSettings();
|
||||
void ShowChatWindow ( const bool bForceRaise = true );
|
||||
void ShowAnalyzerConsole();
|
||||
|
@ -111,6 +112,7 @@ protected:
|
|||
CChatDlg ChatDlg;
|
||||
CConnectDlg ConnectDlg;
|
||||
CAnalyzerConsole AnalyzerConsole;
|
||||
CMusProfDlg MusicianProfileDlg;
|
||||
|
||||
public slots:
|
||||
void OnAboutToQuit() { pSettings->Save(); }
|
||||
|
@ -137,6 +139,7 @@ public slots:
|
|||
#endif
|
||||
|
||||
void OnOpenConnectionSetupDialog() { ShowConnectionSetupDialog(); }
|
||||
void OnOpenMusicianProfileDialog() { ShowMusicianProfileDialog(); }
|
||||
void OnOpenGeneralSettings() { ShowGeneralSettings(); }
|
||||
void OnOpenChatDialog() { ShowChatWindow(); }
|
||||
void OnOpenAnalyzerConsole() { ShowAnalyzerConsole(); }
|
||||
|
|
Loading…
Reference in a new issue