[Kde-imaging] kdeextragear-libs-1/kipi-plugins/timeadjust
Gilles Caulier
caulier.gilles at free.fr
Tue Sep 7 10:23:20 CEST 2004
CVS commit by cgilles:
Added About data in KIPI TimeAdjust plugin.
CCMAIL: kde-imaging at kde.org
M +39 -20 timeadjustdialog.cpp 1.9
M +16 -3 timeadjustdialog.h 1.3
--- kdeextragear-libs-1/kipi-plugins/timeadjust/timeadjustdialog.cpp #1.8:1.9
@@ -28,10 +28,15 @@
#include <qspinbox.h>
#include <qgrid.h>
+#include <qpushbutton.h>
// KDE includes.
#include <kdebug.h>
-#include <kiconloader.h>
#include <klocale.h>
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <khelpmenu.h>
+#include <kiconloader.h>
+#include <kpopupmenu.h>
// LibKIPI includes.
@@ -47,12 +52,34 @@ namespace KIPITimeAdjustPlugin
TimeAdjustDialog::TimeAdjustDialog( KIPI::Interface* interface, QWidget* parent, const char* name )
- :KDialogBase( IconList, i18n("Adjust Time & Date"), Help|Ok|Cancel, Ok, parent, name ),
+ : KDialogBase( IconList, i18n("Adjust Time & Date"), Help|Ok|Cancel, Ok, parent, name ),
m_interface( interface )
{
+ // About data and help button.
+
+ KAboutData* about = new KAboutData("kipiplugins",
+ I18N_NOOP("Time Adjust"),
+ "0.1.0-cvs",
+ I18N_NOOP("A KIPI plugin for adjusting dates and times"),
+ KAboutData::License_GPL,
+ "(c) 2003-2004, Jesper K. Pedersen",
+ 0,
+ "http://extragear.kde.org/apps/kipi.php");
+
+ about->addAuthor("Jesper K. Pedersen", I18N_NOOP("Author and maintainer"),
+ "blackie at kde.org");
+
+ m_helpButton = actionButton( Help );
+ KHelpMenu* helpMenu = new KHelpMenu(this, about, false);
+ helpMenu->menu()->removeItemAt(0);
+ helpMenu->menu()->insertItem(i18n("Time Adjust handbook"), this, SLOT(slotHelp()), 0, -1, 0);
+ m_helpButton->setPopup( helpMenu->menu() );
+
+ // ------------------------------------------------------------------
+
addInfoPage();
addConfigPage();
- addAboutPage();
- setHelp("timeadjust", "kipi-plugins");
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOK() ) );
+
+ connect( this, SIGNAL( okClicked() ),
+ this, SLOT( slotOK() ) );
}
@@ -87,16 +114,8 @@ void TimeAdjustDialog::setImages( const
}
-void TimeAdjustDialog::addAboutPage()
+void TimeAdjustDialog::slotHelp()
{
- QWidget* pageAbout = addPage( i18n("About"), i18n("About KIPI Plugin"),
- BarIcon("kipi", KIcon::SizeMedium ) );
- QVBoxLayout *vlay = new QVBoxLayout( pageAbout, 6 );
-
- QLabel *label = new QLabel( i18n("<qt><p>A KIPI plugin for adjusting dates and times<br/>"
- "Author: Jesper K. Pedersen<br/>"
- "Email: blackie at kde.org</p></qt>"), pageAbout);
- vlay->addWidget(label);
- vlay->addStretch(1);
-
+ KApplication::kApplication()->invokeHelp("timeadjust",
+ "kipi-plugins");
}
--- kdeextragear-libs-1/kipi-plugins/timeadjust/timeadjustdialog.h #1.2:1.3
@@ -34,9 +34,11 @@
class QSpinBox;
class QRadioButton;
+class QPushButton;
namespace KIPITimeAdjustPlugin
{
-class TimeAdjustDialog :public KDialogBase {
+class TimeAdjustDialog :public KDialogBase
+{
Q_OBJECT
@@ -48,4 +52,5 @@ protected slots:
void updateExample();
void slotOK();
+ void slotHelp();
protected:
@@ -52,5 +58,4 @@ protected:
void addInfoPage();
void addConfigPage();
- void addAboutPage();
QDateTime updateTime( QDateTime time ) const;
@@ -56,8 +61,16 @@ protected:
private:
+
KIPI::Interface* m_interface;
+
KURL::List m_images;
+
QRadioButton* m_add;
+
QLabel* m_infoLabel;
+ QLabel* m_exampleAdj;
+
+ QPushButton* m_helpButton;
+
QSpinBox* m_secs;
QSpinBox* m_minutes;
@@ -66,5 +79,5 @@ private:
QSpinBox* m_months;
QSpinBox* m_years;
- QLabel* m_exampleAdj;
+
QDateTime m_exampleDate;
More information about the Kde-imaging
mailing list