Public Member Functions | Protected Attributes

QmitkGeneralPreferencePage Struct Reference

#include <QmitkGeneralPreferencePage.h>

Inheritance diagram for QmitkGeneralPreferencePage:
Inheritance graph
[legend]
Collaboration diagram for QmitkGeneralPreferencePage:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 QmitkGeneralPreferencePage ()
virtual void Init (berry::IWorkbench::Pointer workbench)
virtual void CreateQtControl (QWidget *parent)
virtual QWidget * GetQtControl () const
virtual bool PerformOk ()
virtual void PerformCancel ()
virtual void Update ()

Protected Attributes

berry::IPreferences::WeakPtr m_GeneralPreferencesNode
QWidget * m_MainControl

Detailed Description

Definition at line 35 of file QmitkGeneralPreferencePage.h.


Constructor & Destructor Documentation

QmitkGeneralPreferencePage::QmitkGeneralPreferencePage (  )

Definition at line 30 of file QmitkGeneralPreferencePage.cpp.

: m_MainControl(0)
{

}

Member Function Documentation

void QmitkGeneralPreferencePage::CreateQtControl ( QWidget *  parent ) [virtual]
See also:
IQtPreferencePage::CreateQtControl(Qwidget*)

Implements berry::IQtPreferencePage.

Definition at line 41 of file QmitkGeneralPreferencePage.cpp.

References ID, m_GeneralPreferencesNode, m_MainControl, and Update().

{
  IPreferencesService::Pointer prefService = Platform::GetServiceRegistry().GetServiceById<IPreferencesService>(IPreferencesService::ID);
  berry::IPreferences::Pointer _GeneralPreferencesNode = prefService->GetSystemPreferences()->Node("/General");
  m_GeneralPreferencesNode = _GeneralPreferencesNode;

//   m_StartMaximized = new QCheckBox("Start Main Window &Maximized", this);

  m_MainControl = new QWidget(parent);
  QGridLayout* layout = new QGridLayout;
//   layout->addWidget(m_StartMaximized, 0,0);
//   layout->setRowStretch(0, 0);
//   layout->setRowStretch(1, 20);

  m_MainControl->setLayout(layout);
  this->Update();
}
QWidget * QmitkGeneralPreferencePage::GetQtControl (  ) const [virtual]
See also:
IQtPreferencePage::GetQtControl()

Implements berry::IQtPreferencePage.

Definition at line 59 of file QmitkGeneralPreferencePage.cpp.

References m_MainControl.

{
  return m_MainControl;
}
void QmitkGeneralPreferencePage::Init ( berry::IWorkbench::Pointer  workbench ) [virtual]
See also:
IPreferencePage::Init(IWorkbench::Pointer)

Implements berry::IPreferencePage.

Definition at line 36 of file QmitkGeneralPreferencePage.cpp.

{

}
void QmitkGeneralPreferencePage::PerformCancel (  ) [virtual]
See also:
IPreferencePage::PerformCancel()

Implements berry::IPreferencePage.

Definition at line 76 of file QmitkGeneralPreferencePage.cpp.

{

}
bool QmitkGeneralPreferencePage::PerformOk (  ) [virtual]
See also:
IPreferencePage::PerformOk()

Implements berry::IPreferencePage.

Definition at line 64 of file QmitkGeneralPreferencePage.cpp.

References berry::WeakPointer< TObjectType >::Lock(), and m_GeneralPreferencesNode.

{
  IPreferences::Pointer _GeneralPreferencesNode = m_GeneralPreferencesNode.Lock();
//   if(_GeneralPreferencesNode.IsNotNull())
//   {
//     _GeneralPreferencesNode->PutBool("startMaximized", m_StartMaximized->isChecked());
//     _GeneralPreferencesNode->Flush();
//     return true;
//   }
  return false;
}
void QmitkGeneralPreferencePage::Update (  ) [virtual]
See also:
IPreferencePage::Update()

Implements berry::IPreferencePage.

Definition at line 81 of file QmitkGeneralPreferencePage.cpp.

References berry::WeakPointer< TObjectType >::Lock(), and m_GeneralPreferencesNode.

Referenced by CreateQtControl().

{
  IPreferences::Pointer _GeneralPreferencesNode = m_GeneralPreferencesNode.Lock();
//   if(_GeneralPreferencesNode.IsNotNull())
//     m_StartMaximized->setChecked(_GeneralPreferencesNode->GetBool("startMaximized", false));
}

Member Data Documentation

Definition at line 73 of file QmitkGeneralPreferencePage.h.

Referenced by CreateQtControl(), PerformOk(), and Update().

Definition at line 76 of file QmitkGeneralPreferencePage.h.

Referenced by CreateQtControl(), and GetQtControl().


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines