void QmitkDicomEditor::CreateQtPartControl(QWidget *parent ) { m_Controls.setupUi( parent ); m_Controls.LocalStorageButton->setIcon(QIcon(":/org.mitk.gui.qt.dicom/drive-harddisk_32.png")); m_Controls.FolderButton->setIcon(QIcon(":/org.mitk.gui.qt.dicom/folder_32.png")); m_Controls.CDButton->setIcon(QIcon(":/org.mitk.gui.qt.dicom/media-optical_32.png")); m_Controls.QueryRetrieveButton->setIcon(QIcon(":/org.mitk.gui.qt.dicom/network-workgroup_32.png")); m_Controls.StoreSCPStatusLabel->setTextFormat(Qt::RichText); m_Controls.StoreSCPStatusLabel->setText("<img src=':/org.mitk.gui.qt.dicom/network-offline_16.png'>"); TestHandler(); SetPluginDirectory(); SetDatabaseDirectory("DatabaseDirectory"); CreateTemporaryDirectory(); StartDicomDirectoryListener(); SetupImportDialog(); SetupProgressDialog(parent); m_Controls.m_ctkDICOMQueryRetrieveWidget->useProgressDialog(false); connect(m_Controls.externalDataWidget,SIGNAL(SignalStartDicomImport(const QStringList&)),m_Controls.internalDataWidget,SLOT(OnStartDicomImport(const QStringList&))); connect(m_Controls.externalDataWidget,SIGNAL(SignalDicomToDataManager(QHash<QString,QVariant>)),this,SLOT(OnViewButtonAddToDataManager(QHash<QString,QVariant>))); connect(m_Controls.externalDataWidget,SIGNAL(SignalChangePage(int)), this, SLOT(OnChangePage(int))); connect(m_Controls.internalDataWidget,SIGNAL(SignalFinishedImport()),this,SLOT(OnDicomImportFinished())); connect(m_Controls.internalDataWidget,SIGNAL(SignalDicomToDataManager(QHash<QString,QVariant>)),this,SLOT(OnViewButtonAddToDataManager(QHash<QString,QVariant>))); connect(m_Controls.CDButton, SIGNAL(clicked()), this, SLOT(OnFolderCDImport())); connect(m_Controls.FolderButton, SIGNAL(clicked()), this, SLOT(OnFolderCDImport())); connect(m_Controls.QueryRetrieveButton, SIGNAL(clicked()), this, SLOT(OnQueryRetrieve())); connect(m_Controls.LocalStorageButton, SIGNAL(clicked()), this, SLOT(OnLocalStorage())); }
bool Panel::ExecShortcutFolder(string strShortcutFolder, const GUID& PluginGuid, const string& strPluginFile, const string& strPluginData, bool CheckType, bool TryClosest, bool Silent) { auto SrcPanel = shared_from_this(); const auto AnotherPanel = Parent()->GetAnotherPanel(this); if(CheckType) { switch (GetType()) { case panel_type::FILE_PANEL: break; case panel_type::TREE_PANEL: case panel_type::QVIEW_PANEL: case panel_type::INFO_PANEL: if (AnotherPanel->GetType() == panel_type::FILE_PANEL) SrcPanel=AnotherPanel; break; } } bool CheckFullScreen=SrcPanel->IsFullScreen(); if (PluginGuid != FarGuid) { bool Result = false; ShortcutInfo Info; GetShortcutInfo(Info); if (Info.PluginGuid == PluginGuid && Info.PluginFile == strPluginFile && Info.PluginData == strPluginData) { Result = SetPluginDirectory(strShortcutFolder, Silent); } else { if (ProcessPluginEvent(FE_CLOSE, nullptr)) { return false; } if (const auto pPlugin = Global->CtrlObject->Plugins->FindPlugin(PluginGuid)) { if (pPlugin->has(iOpen)) { if (!strPluginFile.empty()) { auto strRealDir = strPluginFile; if (CutToSlash(strRealDir)) { SrcPanel->SetCurDir(strRealDir,true); SrcPanel->GoToFile(PointToName(strPluginFile)); SrcPanel->ClearAllItem(); } } const auto IsActive = SrcPanel->IsFocused(); OpenShortcutInfo info= { sizeof(OpenShortcutInfo), strPluginFile.empty()? nullptr : strPluginFile.c_str(), strPluginData.empty()? nullptr : strPluginData.c_str(), IsActive? FOSF_ACTIVE : FOSF_NONE }; if (auto hNewPlugin = Global->CtrlObject->Plugins->Open(pPlugin, OPEN_SHORTCUT, FarGuid, reinterpret_cast<intptr_t>(&info))) { const auto NewPanel = Parent()->ChangePanel(SrcPanel, panel_type::FILE_PANEL, TRUE, TRUE); NewPanel->SetPluginMode(std::move(hNewPlugin), {}, IsActive || !Parent()->GetAnotherPanel(NewPanel)->IsVisible()); Result = NewPanel->SetPluginDirectory(strShortcutFolder, Silent); } } } } return Result; } strShortcutFolder = os::env::expand(strShortcutFolder); if (!CheckShortcutFolder(strShortcutFolder, TryClosest, Silent) || ProcessPluginEvent(FE_CLOSE, nullptr)) { return false; } SrcPanel->SetCurDir(strShortcutFolder,true); if (CheckFullScreen!=SrcPanel->IsFullScreen()) Parent()->GetAnotherPanel(SrcPanel)->Show(); SrcPanel->Refresh(); return true; }