--===============0261932477== Content-Type: multipart/alternative; boundary="===============8202556625188344782==" --===============8202556625188344782== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://svn.reviewboard.kde.org/r/6336/#review9760 ----------------------------------------------------------- a good step in the right direction, but it's still needs work. looking at the approach taken, i'd probably do this: * rename ClockTimer to something clearer -> ClockToolTip? * have ClockToolTip subclass both QObject and Plasma::ToolTipContent * move updateToolTip into ClockToolTip, renamed as dataUpdated(const QStrin= g &source, const Plasma::DataEngine &data) ;) * connect to the dataengine on creation of ClockToolTip * create a ClockToolTip object when toolTipAboutToShow is called * delete it in toolTipHidden * pass in the ClockApplet as the parent to ClockToolTip and then in ClockTo= olTip::dataUpdated, set the mainText and then call Plasma::ToolTipManager::= self()->setContent(clockApplet, this) that means that ClockApplet::updateToolTip would no long be available to su= bclasses, but that's ok because they were only using it to update the toolt= ip when the time changed ... which ClockApplet would now be doing for them. /trunk/KDE/kdebase/workspace/libs/plasmaclock/clockapplet.cpp this will interfere with any clock applet (which is all of them) which = implements dataUpdated. = moreover, calling updateTipContent without the data passed in, only to = discard it seems wasteful. - Aaron On Jan. 29, 2011, 2:15 p.m., Iamluc wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://svn.reviewboard.kde.org/r/6336/ > ----------------------------------------------------------- > = > (Updated Jan. 29, 2011, 2:15 p.m.) > = > = > Review request for Plasma. > = > = > Summary > ------- > = > Hi, > = > When using a clock applet, seconds are often not visibles. But sometimes = you need them. > This patch shows them in the tooltip of the applet. > = > Analog-clock has been updated to refresh the tooltip every seconds. > If this change is accepted, I could change digital-clock > = > Thanks ! > = > = > Diffs > ----- > = > /trunk/KDE/kdebase/workspace/libs/plasmaclock/clockapplet.h 1217808 = > /trunk/KDE/kdebase/workspace/libs/plasmaclock/clockapplet.cpp 1217808 = > = > Diff: http://svn.reviewboard.kde.org/r/6336/diff > = > = > Testing > ------- > = > It Works on plasmoidviewer and with a real session > = > = > Thanks, > = > Iamluc > = > --===============8202556625188344782== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://svn.reviewb= oard.kde.org/r/6336/

a good ste=
p in the right direction, but it's still needs work.

looking at the approach taken, i'd probably do this:

* rename ClockTimer to something clearer -> ClockToolTip?
* have ClockToolTip subclass both QObject and Plasma::ToolTipContent
* move updateToolTip into ClockToolTip, renamed as dataUpdated(const QStrin=
g &source, const Plasma::DataEngine &data) ;)
* connect to the dataengine on creation of ClockToolTip
* create a ClockToolTip object when toolTipAboutToShow is called
* delete it in toolTipHidden
* pass in the ClockApplet as the parent to ClockToolTip and then in ClockTo=
olTip::dataUpdated, set the mainText and then call Plasma::ToolTipManager::=
self()->setContent(clockApplet, this)

that means that ClockApplet::updateToolTip would no long be available to su=
bclasses, but that's ok because they were only using it to update the t=
ooltip when the time changed ... which ClockApplet would now be doing for t=
hem.

= =
/trunk/KDE/kdebase/workspace/libs/plasmaclock/clockapplet.cpp<= /a> (Diff revision 3)
void ClockApplet::connectToEngine()
264
void ClockApplet::dataUpdat=
ed(const QString& sou=
rce, const Plasma::DataEn=
gine::Data &data)
265
{
266
    updateTipContent<=
span class=3D"p">();
267
}
this will interfere with any clock applet (which is all of them) whi=
ch implements dataUpdated.

moreover, calling updateTipContent without the data passed in, only to disc=
ard it seems wasteful.

- Aaron


On January 29th, 2011, 2:15 p.m., Iamluc wrote:

Review request for Plasma.
By Iamluc.

Updated Jan. 29, 2011, 2:15 p.m.

Descripti= on

Hi,

When using a clock applet, seconds are often not visibles. But sometimes yo=
u need them.
This patch shows them in the tooltip of the applet.

Analog-clock has been updated to refresh the tooltip every seconds.
If this change is accepted, I could change digital-clock

Thanks !

Testing <= /h1>
It Works on plasmoidviewer and with a real session

Diffs=

  • /trunk/KDE/kdebase/workspace/libs/plasmaclock/clockapplet.h (1217808)
  • /trunk/KDE/kdebase/workspace/libs/plasmaclock/clockapplet.cpp (1217808)

View Diff

--===============8202556625188344782==-- --===============0261932477== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============0261932477==--