[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-multimedia
Subject: [PATCH] Help Menu in aKtion
From: Chris Howells <chris () chrishowells ! co ! uk>
Date: 2001-12-18 18:46:58
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Finally (!) I have came up with this patch which adds a Help menu to aKtion.
Please review.
I'm not 100% happy with it because I don't really like the behaviour of the
Toolbar Help button now (it's not completely obvious it's a drop down menu).
But I think it's better than it was :)
- --
Cheers, Chris Howells -- chris@chrishowells.co.uk, howells@kde.org
Web: http://chrishowells.co.uk, PGP key: http://chrishowells.co.uk/pgp.txt
KDE: http://www.koffice.org, http://edu.kde.org, http://usability.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8H48iF8Iu1zN5WiwRAkcJAJ40p4zFrIugrtySuWJsLXeql3pPagCgocO5
Kskit3C+j/DNHOCg/3+Lj9s=
=1LqV
-----END PGP SIGNATURE-----
["aktion.diff" (text/x-diff)]
Index: aktion_part.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/aktion/aktion_part.cpp,v
retrieving revision 1.11
diff -u -3 -p -r1.11 aktion_part.cpp
--- aktion_part.cpp 2001/09/12 19:35:16 1.11
+++ aktion_part.cpp 2001/12/18 18:46:31
@@ -89,9 +89,9 @@ KAboutData *AktionFactory::aboutData()
{
KAboutData *about = new KAboutData("aktion", I18N_NOOP("aKtion"), version,
description, KAboutData::License_GPL,
- "(c) 2000 Guillermo P. Marotte");
- about->addAuthor("Guillermo P. Marotte",0, "g-marotte@usa.net");
- return about;
+ "(c) 2000, Guillermo P. Marotte");
+ about->addAuthor("Guillermo P. Marotte",0, "g-marotte@usa.net");
+ return about;
}
AktionPart::AktionPart(QWidget *parentWidget, const char *widgetName,
Index: principal.cpp
===================================================================
RCS file: /home/kde/kdemultimedia/aktion/principal.cpp,v
retrieving revision 1.27
diff -u -3 -p -r1.27 principal.cpp
--- principal.cpp 2001/12/11 23:35:22 1.27
+++ principal.cpp 2001/12/18 18:46:34
@@ -14,6 +14,10 @@
#include <kstddirs.h>
#include <kseparator.h>
+#include <kpopupmenu.h>
+#include <khelpmenu.h>
+#include <kaboutdata.h>
+
#include <qtoolbutton.h>
#include <qiconset.h>
#include <qlabel.h>
@@ -130,18 +134,33 @@ Principal::Principal( const char *name)
retroceder->setAutoRepeat( true );
QToolTip::add(retroceder,i18n("Backward"));
+
+ // Setup the about menu
+ static const char *description = I18N_NOOP("KDE Video Player");
+ static const char *version = "1.99";
+
+ KAboutData *aboutAktion = new KAboutData("aktion", "aKtion", version,
+ description, KAboutData::License_GPL,
+ "(c) 2000, Guillermo P. Marotte");
+ aboutAktion->addAuthor("Guillermo P. Marotte", "Author", "g-marotte@usa.net");
+
+ KHelpMenu *mHelpMenu = new KHelpMenu(this, aboutAktion);
+
+
ayuda = new QToolButton(mainwidget, "ayuda");
ayuda->setIconSet(MainBarIconSet("help"));
+ ayuda->setPopup(mHelpMenu->menu());
+ ayuda->setPopupDelay(0);
QToolTip::add(ayuda,i18n("Help"));
configB = new QToolButton(mainwidget, "Setup");
configB->setIconSet(MainBarIconSet("configure"));
QToolTip::add(configB,i18n("Setup"));
+ connect(ayuda,SIGNAL(clicked()),
+ this,SLOT(open_help()) );
connect(abrir,SIGNAL(clicked()),
this,SLOT(click_open()) );
- connect(ayuda,SIGNAL(clicked()),
- this,SLOT(click_ayuda()) );
connect(configB,SIGNAL(clicked()),
this,SLOT(click_config()) );
connect(tocar,SIGNAL(clicked()),
@@ -306,6 +325,11 @@ bool Principal::queryExit()
return true;
}
+void Principal::open_help()
+{
+ kapp->invokeHelp();
+}
+
void Principal::click_open()
{
/* the idea behind this method is not very simple:
@@ -430,11 +454,6 @@ void Principal::dropEvent( QDropEvent *e
}
}
-void Principal::click_ayuda()
-{
- kapp->invokeHelp();
-}
-
void Principal::click_play()
{
/* maube do we need to resize the whole application? */
@@ -581,7 +600,6 @@ void Principal::keyPressEvent( QKeyEvent
video->volumeDecrement();
}
break;
- case Key_F1 : click_ayuda(); break;
case Key_Escape: this->close(); break;
case Key_C : theCapturer.captureWidget(video); break;
default : if (inFullScreen)
Index: principal.h
===================================================================
RCS file: /home/kde/kdemultimedia/aktion/principal.h,v
retrieving revision 1.12
diff -u -3 -p -r1.12 principal.h
--- principal.h 2000/10/01 21:35:01 1.12
+++ principal.h 2001/12/18 18:46:35
@@ -24,6 +24,10 @@ class KConfig;
class KIconLoader;
class KWin;
+class KPopupMenu;
+class KHelpMenu;
+class KAboutData;
+
class aktionVm;
class capture;
@@ -42,8 +46,8 @@ private:
QToolButton *abrir;
QToolButton *avanzar;
QToolButton *retroceder;
- QToolButton *ayuda;
- QToolButton *configB;
+ QToolButton *ayuda;
+ QToolButton *configB;
QFrame *line;
QLabel *logoWidget;
KXAnim *video;
@@ -55,6 +59,8 @@ private:
int whatToDo;
int menuItemFullScreen;
KConfig *config;
+ KAboutData *aboutAktion;
+ KHelpMenu *mHelpMenu;
void changeSize(float);
void changeInitialSize();
void setParameters();
@@ -87,12 +93,12 @@ protected:
virtual void dropEvent( QDropEvent *);
signals:
public slots:
+ void open_help();
void click_open();
void click_play();
void click_stop();
void click_forward();
void click_backward();
- void click_ayuda();
void click_config();
void click_info();
void click_original();
_______________________________________________
kde-multimedia mailing list
kde-multimedia@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-multimedia
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic