Пример #1
0
QmitkAboutDialog::QmitkAboutDialog(QWidget* parent, Qt::WindowFlags f)
:QDialog(parent, f)
{
  Ui::QmitkAboutDialog gui;
  gui.setupUi(this);

  QString mitkRevision(MITK_REVISION);
  //mitkRevision.replace( QRegExp("[^0-9]+(\\d+).*"), "\\1");
  QString itkVersion = "%1.%2.%3";
  itkVersion = itkVersion.arg(ITK_VERSION_MAJOR).arg(ITK_VERSION_MINOR).arg(ITK_VERSION_PATCH);
  QString vtkVersion = "%1.%2.%3";
  vtkVersion = vtkVersion.arg(VTK_MAJOR_VERSION).arg(VTK_MINOR_VERSION).arg(VTK_BUILD_VERSION);

  gui.m_PropsLabel->setText(gui.m_PropsLabel->text().arg(itkVersion, QT_VERSION_STR, vtkVersion, mitkRevision));
      
  //general
  //connect( m_GUI->btnQuitApplication,SIGNAL(clicked()), qApp, SLOT(closeAllWindows()) );

}
Пример #2
0
QmitkAboutDialog::QmitkAboutDialog(QWidget* parent, Qt::WindowFlags f)
    : QDialog(parent, f)
{
    m_GUI.setupUi(this);

    QString mitkRevision(MITK_REVISION);
    QString mitkRevisionDescription(MITK_REVISION_DESC);
    QString itkVersion = QString("%1.%2.%3").arg(ITK_VERSION_MAJOR).arg(ITK_VERSION_MINOR).arg(ITK_VERSION_PATCH);
    QString vtkVersion = QString("%1.%2.%3").arg(VTK_MAJOR_VERSION).arg(VTK_MINOR_VERSION).arg(VTK_BUILD_VERSION);

    QString revisionText = QString("Revision: %1").arg(MITK_REVISION);

    if (!QString(MITK_REVISION_DESC).isEmpty())
        revisionText += QString("\nDescription: %1").arg(MITK_REVISION_DESC);

    m_GUI.m_RevisionLabel->setText(revisionText);
    m_GUI.m_ToolkitVersionsLabel->setText(QString("ITK %1, VTK %2, Qt %3").arg(itkVersion, vtkVersion, QT_VERSION_STR));

    QPushButton* btnModules = new QPushButton(QIcon(":/qmitk/ModuleView.png"), "Modules");
    m_GUI.m_ButtonBox->addButton(btnModules, QDialogButtonBox::ActionRole);

    connect(btnModules, SIGNAL(clicked()), this, SLOT(ShowModules()));
    connect(m_GUI.m_ButtonBox, SIGNAL(rejected()), this, SLOT(reject()));
}
Пример #3
0
std::string QmitkExtWorkbenchWindowAdvisor::ComputeTitle()
{
 berry::IWorkbenchWindowConfigurer::Pointer configurer =
  GetWindowConfigurer();
 berry::IWorkbenchPage::Pointer currentPage =
  configurer->GetWindow()->GetActivePage();
 berry::IEditorPart::Pointer activeEditor;
 if (currentPage)
 {
  activeEditor = lastActiveEditor.Lock();
 }

 std::string title;
 //TODO Product
 //    IProduct product = Platform.getProduct();
 //    if (product != null) {
 //      title = product.getName();
 //    }
 // instead of the product name, we use a custom variable for now
 title = productName;

 if(showMitkVersionInfo)
 {
   title += std::string(" ") + MITK_VERSION_STRING;
 }

 if (showVersionInfo)
 {
  // add version informatioin
  QString mitkRevision(MITK_REVISION);
  mitkRevision = mitkRevision.left(6) + " (" MITK_REVISION_NAME ")";
  QString versions = QString(" (ITK %1.%2.%3  VTK %4.%5.%6 Qt %7 MITK %8)")
   .arg(ITK_VERSION_MAJOR).arg(ITK_VERSION_MINOR).arg(ITK_VERSION_PATCH)
   .arg(VTK_MAJOR_VERSION).arg(VTK_MINOR_VERSION).arg(VTK_BUILD_VERSION)
   .arg(QT_VERSION_STR)
   .arg(mitkRevision);

  title += versions.toStdString();
 }

 if (currentPage)
 {
  if (activeEditor)
  {
   lastEditorTitle = activeEditor->GetTitleToolTip();
   if (!lastEditorTitle.empty())
    title = lastEditorTitle + " - " + title;
  }
  berry::IPerspectiveDescriptor::Pointer persp =
   currentPage->GetPerspective();
  std::string label = "";
  if (persp)
  {
   label = persp->GetLabel();
  }
  berry::IAdaptable* input = currentPage->GetInput();
  if (input && input != wbAdvisor->GetDefaultPageInput())
  {
   label = currentPage->GetLabel();
  }
  if (!label.empty())
  {
   title = label + " - " + title;
  }
 }

 title += " (Not for use in diagnosis or treatment of patients)";

 return title;
}