Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Opie::Ui::OKeyConfigWidget Class Reference

#include </home/clem/local/src/opie/libopie2/opieui/okeyconfigwidget.h>

Collaboration diagram for Opie::Ui::OKeyConfigWidget:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ChangeMode { Imediate, Queue }

Public Member Functions

 OKeyConfigWidget (QWidget *parent=0, const char *name=0, WFlags fl=0)
virtual ~OKeyConfigWidget ()
void setChangeMode (enum ChangeMode)
ChangeMode changeMode () const
void insert (const QString &name, Opie::Core::OKeyConfigManager *)
void load ()
void save ()

Protected Slots

void slotListViewItem (QListViewItem *)
void slotNoKey ()
void slotDefaultKey ()
void slotCustomKey ()
void slotConfigure ()

Private Member Functions

void updateItem (Opie::Ui::Internal::OKeyListViewItem *man, const Opie::Core::OKeyPair &newItem)
void initUi ()

Static Private Member Functions

static bool sanityCheck (Opie::Ui::Internal::OKeyListViewItem *man, const Opie::Core::OKeyPair &newItem)

Private Attributes

Opie::Ui::OListViewm_view
Opie::Ui::Internal::OKeyConfigWidgetPrivateList m_list
QLabel * m_lbl
QPushButton * m_btn
QRadioButton * m_def
QRadioButton * m_cus
QRadioButton * m_none
QWidget * m_box
ChangeMode m_mode
Private * d

Detailed Description

With this Widget you can let the Keyboard Shortcuts be configured by the user. There are two ways you can use this widget. Either in a tab were all changes are immediately getting into effect or in a queue were you ask for saving. Save won't write the data but only set it to the OKeyConfigManager.

Normally subclassing this widget does not make much sense as the widget content as such is immutable. If I'm wrong I'm willing to learn and you could mail me which functions do make sense with virtual on it (zecke@handhelds.org).

Since:
1.2

Definition at line 48 of file okeyconfigwidget.h.


Member Enumeration Documentation

enum Opie::Ui::OKeyConfigWidget::ChangeMode
 

Immediate Apply the change directly to the underlying OKeyConfigManager Queue Save all items and then apply when you save()

Enumeration values:
Imediate 
Queue 

Definition at line 56 of file okeyconfigwidget.h.


Constructor & Destructor Documentation

Opie::Ui::OKeyConfigWidget::OKeyConfigWidget QWidget *  parent = 0,
const char *  name = 0,
WFlags  fl = 0
 

This is a c'tor. You still need to pass the OKeyConfigManager and then issue a load. The default mode is Immediate

Definition at line 105 of file okeyconfigwidget.cpp.

References initUi().

Opie::Ui::OKeyConfigWidget::~OKeyConfigWidget  )  [virtual]
 

c'tor

Definition at line 115 of file okeyconfigwidget.cpp.


Member Function Documentation

OKeyConfigWidget::ChangeMode Opie::Ui::OKeyConfigWidget::changeMode  )  const
 

return the current mode

Definition at line 208 of file okeyconfigwidget.cpp.

References m_mode.

void Opie::Ui::OKeyConfigWidget::initUi  )  [private]
 

For internal use only.

Definition at line 122 of file okeyconfigwidget.cpp.

References Opie::Ui::OListView::addColumn(), m_box, m_btn, m_cus, m_def, m_lbl, m_none, m_view, slotConfigure(), slotCustomKey(), slotDefaultKey(), slotListViewItem(), slotNoKey(), and tr.

Referenced by OKeyConfigWidget().

void Opie::Ui::OKeyConfigWidget::insert const QString name,
Opie::Core::OKeyConfigManager
 

Referenced by IRCSettings::IRCSettings(), MainWindow::slotClicked(), and PMainWindow::slotConfig().

void Opie::Ui::OKeyConfigWidget::load  ) 
 

loads the items and allows editing them

Definition at line 225 of file okeyconfigwidget.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), list, m_list, and m_view.

Referenced by IRCSettings::IRCSettings(), MainWindow::slotClicked(), and PMainWindow::slotConfig().

static bool Opie::Ui::OKeyConfigWidget::sanityCheck Opie::Ui::Internal::OKeyListViewItem man,
const Opie::Core::OKeyPair newItem
[static, private]
 

void Opie::Ui::OKeyConfigWidget::save  ) 
 

Saves if in Queue Mode. It'll update the supplied OKeyConfigManager objects. If in Queue mode it'll just return

Definition at line 241 of file okeyconfigwidget.cpp.

References Opie::Core::OKeyConfigManager::addKeyConfig(), Opie::Ui::Internal::OKeyListViewItem::item(), m_view, Opie::Ui::Internal::OKeyListViewItem::manager(), Opie::Ui::Internal::OKeyListViewItem::origItem(), and Opie::Core::OKeyConfigManager::removeKeyConfig().

Referenced by IRCSettings::accept(), and PMainWindow::slotConfig().

void Opie::Ui::OKeyConfigWidget::setChangeMode enum ChangeMode  mode  ) 
 

Set the ChangeMode. You need to call this function prior to load If you call this function past load the behaviour is undefined But caling load again is safe

Definition at line 200 of file okeyconfigwidget.cpp.

References m_mode.

Referenced by IRCSettings::IRCSettings(), MainWindow::slotClicked(), and PMainWindow::slotConfig().

void Opie::Ui::OKeyConfigWidget::slotConfigure  )  [protected, slot]
 

Definition at line 332 of file okeyconfigwidget.cpp.

References QPEApplication::execDialog(), m_view, tr, and updateItem().

Referenced by initUi().

void Opie::Ui::OKeyConfigWidget::slotCustomKey  )  [protected, slot]
 

Definition at line 320 of file okeyconfigwidget.cpp.

References m_btn, m_cus, m_def, m_none, and m_view.

Referenced by initUi().

void Opie::Ui::OKeyConfigWidget::slotDefaultKey  )  [protected, slot]
 

Definition at line 307 of file okeyconfigwidget.cpp.

References Opie::Ui::Internal::OKeyListViewItem::item(), m_btn, m_cus, m_def, m_none, m_view, and updateItem().

Referenced by initUi().

void Opie::Ui::OKeyConfigWidget::slotListViewItem QListViewItem *  _item  )  [protected, slot]
 

For internal use only.

Definition at line 263 of file okeyconfigwidget.cpp.

References Opie::Ui::Internal::OKeyListViewItem::item(), Opie::Core::OKeyConfigItem::keyPair(), m_box, m_btn, m_cus, m_def, m_lbl, m_none, and tr.

Referenced by initUi().

void Opie::Ui::OKeyConfigWidget::slotNoKey  )  [protected, slot]
 

Definition at line 289 of file okeyconfigwidget.cpp.

References m_btn, m_cus, m_def, m_none, m_view, and updateItem().

Referenced by initUi().

void Opie::Ui::OKeyConfigWidget::updateItem Opie::Ui::Internal::OKeyListViewItem man,
const Opie::Core::OKeyPair newItem
[private]
 

Referenced by slotConfigure(), slotDefaultKey(), and slotNoKey().


Member Data Documentation

Private* Opie::Ui::OKeyConfigWidget::d [private]
 

Definition at line 88 of file okeyconfigwidget.h.

QWidget* Opie::Ui::OKeyConfigWidget::m_box [private]
 

Definition at line 86 of file okeyconfigwidget.h.

Referenced by initUi(), and slotListViewItem().

QPushButton* Opie::Ui::OKeyConfigWidget::m_btn [private]
 

Definition at line 84 of file okeyconfigwidget.h.

Referenced by initUi(), slotCustomKey(), slotDefaultKey(), slotListViewItem(), and slotNoKey().

QRadioButton * Opie::Ui::OKeyConfigWidget::m_cus [private]
 

Definition at line 85 of file okeyconfigwidget.h.

Referenced by initUi(), slotCustomKey(), slotDefaultKey(), slotListViewItem(), and slotNoKey().

QRadioButton* Opie::Ui::OKeyConfigWidget::m_def [private]
 

Definition at line 85 of file okeyconfigwidget.h.

Referenced by initUi(), slotCustomKey(), slotDefaultKey(), slotListViewItem(), and slotNoKey().

QLabel* Opie::Ui::OKeyConfigWidget::m_lbl [private]
 

Definition at line 83 of file okeyconfigwidget.h.

Referenced by initUi(), and slotListViewItem().

Opie::Ui::Internal::OKeyConfigWidgetPrivateList Opie::Ui::OKeyConfigWidget::m_list [private]
 

Definition at line 82 of file okeyconfigwidget.h.

Referenced by load().

ChangeMode Opie::Ui::OKeyConfigWidget::m_mode [private]
 

Definition at line 87 of file okeyconfigwidget.h.

Referenced by changeMode(), and setChangeMode().

QRadioButton * Opie::Ui::OKeyConfigWidget::m_none [private]
 

Definition at line 85 of file okeyconfigwidget.h.

Referenced by initUi(), slotCustomKey(), slotDefaultKey(), slotListViewItem(), and slotNoKey().

Opie::Ui::OListView* Opie::Ui::OKeyConfigWidget::m_view [private]
 

Definition at line 81 of file okeyconfigwidget.h.

Referenced by initUi(), load(), save(), slotConfigure(), slotCustomKey(), slotDefaultKey(), and slotNoKey().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 18:01:56 2005 for OPIE by  doxygen 1.4.2