From: Pino Toscano Date: Sun, 18 Feb 2007 11:50:09 +0000 (+0000) Subject: Move a private widget into a private header, no need to expose it as public API. X-Git-Tag: v3.80.3~6 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=70ac526b20381e5335227a556b168ce3fe322aab;p=libqmvoc.git Move a private widget into a private header, no need to expose it as public API. svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=634800 --- diff --git a/extdate/extdatetimeedit.cpp b/extdate/extdatetimeedit.cpp index c21b03d..337bd64 100644 --- a/extdate/extdatetimeedit.cpp +++ b/extdate/extdatetimeedit.cpp @@ -27,6 +27,7 @@ #include "extdatetime.h" #include "extdatetimeedit.h" +#include "extdatetimeedit_p.h" class ExtDateEdit::Private { @@ -287,8 +288,8 @@ void ExtDateTimeEdit::slotEmitDateTimeChanged() { emit dateTimeChanged( dateTime() ); } -edLineEdit::edLineEdit( QWidget *parent ) : QLineEdit( parent ) { - edParent = (ExtDateEdit*)parent; +edLineEdit::edLineEdit( ExtDateEdit *parent ) : QLineEdit( parent ) { + edParent = parent; } void edLineEdit::mouseReleaseEvent( QMouseEvent * ) { diff --git a/extdate/extdatetimeedit.h b/extdate/extdatetimeedit.h index e4879cc..2cfba7b 100644 --- a/extdate/extdatetimeedit.h +++ b/extdate/extdatetimeedit.h @@ -328,45 +328,4 @@ dt.time() ); } ExtDateEdit *m_DateEdit; }; -/** - *@class edLineEdit - *@short A QLineEdit adapted for use by ExtDateEdit. - * - *This class simply provides custom keyboard and mouse event handlers - *needed for the ExtDateEdit widget. - *@author Jason Harris - *@version 1.0 - */ -class edLineEdit : public QLineEdit { - public: -/** - *@short Default constructor. - *@p parent pointer to the parent widget; defaults to 0 - */ - edLineEdit( QWidget *parent=0 ); -/** - *@short Default destructor. Empty. - */ - ~edLineEdit() {} - - protected: -/** - *@short Set the active date field based on where in the date - *string the mouse was clicked. - */ - void mouseReleaseEvent( QMouseEvent * ); -/** - *@short Handle arrow-key press events. - * - *Up/Down arrows call ExtDateEdit::stepBy(); - *Left/Right arrows invoke a key press of Shift+Tab/Tab, - *which automatically calls - *ExtDateEdit::focusNextPrevChild() - */ - void keyPressEvent( QKeyEvent *e ); - - private: - ExtDateEdit *edParent; -}; - #endif //EXTDATETIMEEDIT_H diff --git a/extdate/extdatetimeedit_p.h b/extdate/extdatetimeedit_p.h new file mode 100644 index 0000000..17a80f8 --- /dev/null +++ b/extdate/extdatetimeedit_p.h @@ -0,0 +1,58 @@ +/*************************************************************************** + copyright : (C) 2005 by Jason Harris + email : kstars@30doradus.org + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef EXTDATETIMEEDIT_P_H +#define EXTDATETIMEEDIT_P_H + +/** + *@class edLineEdit + *@short A QLineEdit adapted for use by ExtDateEdit. + * + *This class simply provides custom keyboard and mouse event handlers + *needed for the ExtDateEdit widget. + *@author Jason Harris + *@version 1.0 + */ +class edLineEdit : public QLineEdit { + public: +/** + *@short Default constructor. + *@p parent pointer to the parent widget; defaults to 0 + */ + explicit edLineEdit( ExtDateEdit *parent=0 ); +/** + *@short Default destructor. Empty. + */ + ~edLineEdit() {} + + protected: +/** + *@short Set the active date field based on where in the date + *string the mouse was clicked. + */ + void mouseReleaseEvent( QMouseEvent * ); +/** + *@short Handle arrow-key press events. + * + *Up/Down arrows call ExtDateEdit::stepBy(); + *Left/Right arrows invoke a key press of Shift+Tab/Tab, + *which automatically calls + *ExtDateEdit::focusNextPrevChild() + */ + void keyPressEvent( QKeyEvent *e ); + + private: + ExtDateEdit *edParent; +}; + +#endif //EXTDATETIMEEDIT_H