You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

panzar

Beginner

  • "panzar" started this thread

Posts: 10

Location: Skovde, Sweden.

  • Send private message

1

Tuesday, April 19th 2005, 12:41pm

Toolbar problems.

I needed a filebrowser for my application so I "stole" amaroK's filebrowser-class (which is based on kdevelop's filebrowser). I have managed to implement it pretty good in my app, but I'm having some troubles with the toolbar.

The filebrowsers' toolbar is merged with my "standard" toolbar like this:



I don't want it like this, I want to separate toolbars. One for the filebrowser and one standard toolbar.

This is what I mean with "standard toolbar":



Any ideas would be greatly appreciated. Thanks,

Per

This post has been edited 1 times, last edit by "panzar" (Apr 19th 2005, 12:42pm)


anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Tuesday, April 19th 2005, 2:40pm

Depends on how the file browser creates its toolbar.
Maybe through an XML GUI file, in which case it could be possible to place the merge point from your file to a differen toolbar.

Cheers,
_
Qt/KDE Developer
Debian User

Krasu

Beginner

Posts: 30

Location: Republic of Belarus

  • Send private message

3

Wednesday, April 20th 2005, 6:18pm

AFAIR, amaroK created this toolbar manually (without XML GUI). So you should find the code, where he did it and move this toolbar to the main window :)

Note: better write your own filemanager with help of KDirOperator :)

This post has been edited 1 times, last edit by "Krasu" (Apr 20th 2005, 6:19pm)


panzar

Beginner

  • "panzar" started this thread

Posts: 10

Location: Skovde, Sweden.

  • Send private message

4

Wednesday, April 20th 2005, 9:12pm

Quoted

Originally posted by Krasu
Note: better write your own filemanager with help of KDirOperator :)


I have been meaning to ask about this.. Which is easiest, writing my own file selector or adapting someone elses? In the later case, which file-selector would you recomend me to adapt? Kate's, kdevelop's?

Thanks,
Per

Krasu

Beginner

Posts: 30

Location: Republic of Belarus

  • Send private message

5

Wednesday, April 20th 2005, 9:50pm

Quoted

Originally posted by panzar
I have been meaning to ask about this.. Which is easiest, writing my own file selector or adapting someone elses? In the later case, which file-selector would you recomend me to adapt? Kate's, kdevelop's?


It's not so hard as you think. You can create KDirOperator (it's a regular widget) and connect apropriate signals (like clicked() and doubleClicked()). That's all :)

If you want, you can plug() its actions somewhere (for example, in toolbar). For example

Source code

1
2
3
4
5
KActionCollection *coll = dir_operator->actionCollection();

coll->action("back")->plug(toolbar);
coll->action("forward")->plug(toolbar);
coll->action("up")->plug(toolbar);

panzar

Beginner

  • "panzar" started this thread

Posts: 10

Location: Skovde, Sweden.

  • Send private message

6

Thursday, April 21st 2005, 7:49pm

Quoted

Originally posted by Krasu

It's not so hard as you think. You can create KDirOperator (it's a regular widget) and connect apropriate signals (like clicked() and doubleClicked()). That's all :)

If you want, you can plug() its actions somewhere (for example, in toolbar). For example

Source code

1
2
3
4
5
KActionCollection *coll = dir_operator->actionCollection();

coll->action("back")->plug(toolbar);
coll->action("forward")->plug(toolbar);
coll->action("up")->plug(toolbar);


Ok. Sounds good.
I'll give it some thought and then make up my mind.

Thanks,
Per