[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Hi all
From:       Chakkaradeep C C <chaks.yoper () gmail ! com>
Date:       2005-10-03 5:29:19
Message-ID: a54a308e0510022217u438b397dnb5e61be5cd8c8ed () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,
 i tried a lot to understand how the Menu is created.Actually i put a
message box to check the menu name being added....i was able to track for
the 'Parent' Menus (Service Groups)(i.e);Accessories,Development etc.,
 When i press the KMenu Button, the first things added in the menu are these
'Parents'.Then what happens when i move my mouse pointer to one of these
'Parents', their children gets added.I think am right till now.Now am able
to explain till this.But how are these added?..Because, am seriously
concerned with retrieving the 'Children' rather then 'Parent'.And how are
these correctly associated with their parents?..
 when i check the value of "relPath_" in the "doInitialize" funtion with a
message box,
 *************code***********************
// We ask KSycoca to give us all services (sorted).
KServiceGroup::Ptr root = KServiceGroup::group(relPath_);
*************code**************************
i get empty string displayed!..then how is this retriving the 'Parents'??
 i would be happy if my friends could help me out...
 thanks in advance..
 with regards,
C.C.Chakkaradeep

 On 9/30/05, Aaron J. Seigo <aseigo@kde.org> wrote:
>
> On Thursday 29 September 2005 23:15, Chakkaradeep C C wrote:
> > in the Menu creation, where do we 'draw' the Menu?..i want to do
> something
> > like WindowsXP start Menu...
>
> the current kmenu is just a regular popup menu. the inheritence chain is:
> QPopupMenu -> KPopupMenu -> PanelServiceMenu -> KMenu. so the kmenu itself
> doesn't do any drawing. that's all handled in QPopupMenu. if you want to
> do
> something like the XP menu you'll need to make your own custom QWidget
> subclass.
>
> > and,
> > in the Menu creation code...in the "service_mnu.cpp",
> >
> ********************code***************************************************
> >******************************* PanelServiceMenu * m =
> > newSubMenu(g->name(), g->relPath(), this, g->name().toUtf8(),
> > inlineHeaderName);
> >
> ********************code***************************************************
> >******************************* does the above code create a new menu?...
>
> yes.
>
> > "Accessories","Games","Development" etc.,.And is the line below which
> adds
> > them?..
> > "int newId = insertItem(iconset, groupCaption, m, id++);"??
>
> correct
>
> > and when it comes to "KST_KService", how are those items added as child
> to
> > their respective "KST_KServiceGroup" in the insertMenuItem( )
> function.??
>
> the third parameter to insertItem is 'm', which is in this case a pointer
> to
> the parent menu
>
> > I really feel very hard to grasp things as am new to KDE Programing...i
>
> we all start somewhere, somewhen =)
>
> --
> Aaron J. Seigo
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
>
> Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
>
>
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> unsubscribe <<
>
>
>
>

[Attachment #5 (text/html)]

<div>Hi,</div>
<div>&nbsp;</div>
<div>i tried a lot to understand how the Menu is created.Actually i put a message box to check the menu \
name being added....i was able to track for the 'Parent' Menus (Service \
Groups)(i.e);Accessories,Development etc.,</div>

<div>&nbsp;</div>
<div>When i press the KMenu Button, the first things added in the menu are these 'Parents'.Then what \
happens when i move my mouse pointer to one of these 'Parents', their children gets added.I think am \
right till now.Now  am able to&nbsp;explain till&nbsp;this.But how are these added?..Because, am \
seriously concerned with retrieving the 'Children' rather then 'Parent'.And how are these correctly \
associated with their parents?..</div> <div>&nbsp;</div>
<div>when i check the value of &quot;relPath_&quot; in the &quot;doInitialize&quot; funtion with a \
message box,</div> <div>&nbsp;</div>
<div>*************code***********************</div>
<div>// We ask KSycoca to give us all services (sorted).<br>&nbsp;KServiceGroup::Ptr root = \
KServiceGroup::group(relPath_);<br>*************code**************************</div> <div>i get empty \
string displayed!..then how is this retriving the 'Parents'??</div> <div>&nbsp;</div>
<div>i would be happy if my friends could help me out...</div>
<div>&nbsp;</div>
<div>thanks in advance..</div>
<div>&nbsp;</div>
<div>with regards,</div>
<div>C.C.Chakkaradeep<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 9/30/05, <b class="gmail_sendername">Aaron J. Seigo</b> &lt;<a \
href="mailto:aseigo@kde.org">aseigo@kde.org</a>&gt; wrote:</span> <blockquote class="gmail_quote" \
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Thursday 29 \
September 2005 23:15, Chakkaradeep C C wrote:<br>&gt;&nbsp;&nbsp;in the Menu creation, where do we 'draw' \
the Menu?..i want to do something <br>&gt; like WindowsXP start Menu...<br><br>the current kmenu is just \
a regular popup menu. the inheritence chain is:<br>QPopupMenu -&gt; KPopupMenu -&gt; PanelServiceMenu \
-&gt; KMenu. so the kmenu itself<br>doesn't do any drawing. that's all handled in QPopupMenu. if you want \
to do <br>something like the XP menu you'll need to make your own custom \
QWidget<br>subclass.<br><br>&gt;&nbsp;&nbsp;and,<br>&gt;&nbsp;&nbsp;in the Menu creation code...in the \
&quot;service_mnu.cpp&quot;,<br>&gt; \
********************code*************************************************** \
<br>&gt;******************************* PanelServiceMenu * m =<br>&gt; newSubMenu(g-&gt;name(), \
g-&gt;relPath(), this, g-&gt;name().toUtf8(),<br>&gt; inlineHeaderName);<br>&gt; \
********************code*************************************************** \
<br>&gt;******************************* does the above code create a new menu?...<br><br>yes.<br><br>&gt; \
&quot;Accessories&quot;,&quot;Games&quot;,&quot;Development&quot; etc.,.And is the line below which \
adds<br>&gt; them?.. <br>&gt; &quot;int newId = insertItem(iconset, groupCaption, m, \
id++);&quot;??<br><br>correct<br><br>&gt;&nbsp;&nbsp;and when it comes to &quot;KST_KService&quot;, how \
are those items added as child to<br>&gt; their respective &quot;KST_KServiceGroup&quot; in the \
insertMenuItem( ) function.?? <br><br>the third parameter to insertItem is 'm', which is in this case a \
pointer to<br>the parent menu<br><br>&gt;&nbsp;&nbsp;I really feel very hard to grasp things as am new to \
KDE Programing...i<br><br>we all start somewhere, somewhen =) <br><br>--<br>Aaron J. Seigo<br>GPG \
Fingerprint: 8B8B 2209 0C6F 7C47 B1EA&nbsp;&nbsp;EE75 D6B7 2EB1 A7F1 DB43<br><br>Full time KDE developer \
sponsored by Trolltech (<a href="http://www.trolltech.com">http://www.trolltech.com</a>)<br> \
<br><br><br>&gt;&gt; Visit <a \
href="http://mail.kde.org/mailman/listinfo/kde-devel#unsub">http://mail.kde.org/mailman/listinfo/kde-devel#unsub</a> \
to unsubscribe &lt;&lt;<br><br><br><br></blockquote></div><br>



 =

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib=
e <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic