summaryrefslogtreecommitdiff
path: root/library
Side-by-side diff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpemenubar.cpp16
-rw-r--r--library/qpemenubar.h2
2 files changed, 18 insertions, 0 deletions
diff --git a/library/qpemenubar.cpp b/library/qpemenubar.cpp
index 39f8fd6..bb3ad8d 100644
--- a/library/qpemenubar.cpp
+++ b/library/qpemenubar.cpp
@@ -303,6 +303,22 @@ QPEMenuBar::~QPEMenuBar()
*/
void QPEMenuBar::keyPressEvent( QKeyEvent *e )
{
QMenuBar::keyPressEvent( e );
}
+
+void QPEMenuBar::activateItem( int index )
+{
+ activateItemAt( index );
+}
+
+void QPEMenuBar::goodbye()
+{
+ activateItemAt(-1);
+ for ( unsigned int i = 0; i < count(); i++ ) {
+ QMenuItem *mi = findItem( idAt(i) );
+ if ( mi->popup() ) {
+ mi->popup()->hide();
+ }
+ }
+}
diff --git a/library/qpemenubar.h b/library/qpemenubar.h
index 736b12b..5bfbe83 100644
--- a/library/qpemenubar.h
+++ b/library/qpemenubar.h
@@ -62,10 +62,12 @@ class QPEMenuBar : public QMenuBar
public:
QPEMenuBar( QWidget *parent=0, const char* name=0 );
~QPEMenuBar();
protected:
virtual void keyPressEvent( QKeyEvent *e );
+ void activateItem( int index );
+ void goodbye();
};
#endif