-rw-r--r-- | libopie2/opieui/okeyconfigwidget.h | 10 | ||||
-rw-r--r-- | libopie2/opieui/otaskbarapplet.h | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libopie2/opieui/okeyconfigwidget.h b/libopie2/opieui/okeyconfigwidget.h index d11054c..3d2260c 100644 --- a/libopie2/opieui/okeyconfigwidget.h +++ b/libopie2/opieui/okeyconfigwidget.h @@ -7,89 +7,93 @@ #ifndef ODP_KEY_CONFIG_WIDGET_H #define ODP_KEY_CONFIG_WIDGET_H #include <opie2/okeyconfigmanager.h> #include <qhbox.h> class QKeyEvent; class QLabel; class QPushButton; class QListViewItem; class QRadioButton; class QTimer; namespace Opie { namespace Ui { namespace Internal { class OKeyConfigWidgetPrivate; typedef QValueList<OKeyConfigWidgetPrivate> OKeyConfigWidgetPrivateList; class OKeyListViewItem; } class OListViewItem; class OListView; /** * 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 + * 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 */ class OKeyConfigWidget : public QWidget { Q_OBJECT public: /** * Immediate Apply the change directly to the underlying OKeyConfigManager * Queue Save all items and then apply when you save() */ enum ChangeMode { Imediate, Queue }; OKeyConfigWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); - ~OKeyConfigWidget(); + virtual ~OKeyConfigWidget(); void setChangeMode( enum ChangeMode ); ChangeMode changeMode()const; void insert( const QString& name, Opie::Core::OKeyConfigManager* ); void load(); void save(); -private slots: +protected slots: void slotListViewItem( QListViewItem* ); void slotNoKey(); void slotDefaultKey(); void slotCustomKey(); void slotConfigure(); private: static bool sanityCheck( Opie::Ui::Internal::OKeyListViewItem* man, const Opie::Core::OKeyPair& newItem ); void updateItem( Opie::Ui::Internal::OKeyListViewItem* man, const Opie::Core::OKeyPair& newItem); void initUi(); Opie::Ui::OListView *m_view; Opie::Ui::Internal::OKeyConfigWidgetPrivateList m_list; QLabel *m_lbl; QPushButton *m_btn; QRadioButton *m_def, *m_cus, *m_none; QWidget* m_box; ChangeMode m_mode; class Private; Private *d; }; /** * This is a small dialog that allows you to * capture a key sequence. * If you want it to close after a key was captured you * can use this code snippet. * * \code * OKeyChooserConfigDialog diag(0,0,true); diff --git a/libopie2/opieui/otaskbarapplet.h b/libopie2/opieui/otaskbarapplet.h index ec7b9c4..77cc461 100644 --- a/libopie2/opieui/otaskbarapplet.h +++ b/libopie2/opieui/otaskbarapplet.h @@ -82,48 +82,49 @@ template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface return _applet; } virtual int position() const { return T::position(); } private: T* _applet; OTaskbarAppletWrapperPrivate *d; }; } /*====================================================================================== * OTaskbarApplet *======================================================================================*/ // Must be inline until after we shipped Opie 1.0 // Having OTaskBarApplet reside in libopieui2 is not possible // until we link the launcher binary against libopieui2 - // otherwise the necessary symbols are not present, when // the dynamic loader [dlopen] tries to resolve an applet which // inherits OTaskbarApplet class OTaskbarApplet : public QWidget { public: OTaskbarApplet( QWidget* parent, const char* name = 0 ); virtual ~OTaskbarApplet(); + protected: virtual void popup( QWidget* widget ); private: class Private; Private *d; }; } } #define EXPORT_OPIE_APPLET_v1( AppLet ) \ Q_EXPORT_INTERFACE() { \ Q_CREATE_INSTANCE( Opie::Ui::Internal::OTaskbarAppletWrapper<AppLet> ) \ } #endif |