How do I modify the default application interface?

Stephen Dzurenko dzurenko at arlut.utexas.edu
Tue Oct 29 20:10:22 GMT 2002


Caleb Tennis wrote:

>>It appears that I do NOT have a KDE app.  I have not modified the
>>generated code yet.  My main application class, SonarApp, inherits from
>>QMainWindow.  The SonarApp constructor calls a number of init* methods.
>> Among them is initMenuBar() and initToolBar().
>>
>>Looking in the initMenuBar method, there is a line that says "EDIT YOUR
>>APPLICATION SPECIFIC MENUENTRIES HERE."  So I would assume this is where
>>I would make my application-specific additions to the main menu bar.
>>
>>However, what if I want to remove or change the existing menu entries?
>> It seems silly to "undo" the effects of previous code.  For example,
>>the SonarApp class has as members the widgets that make up the edit
>>menu.  The initMenuBar method adds the edit menu to the menu bar.  Am I
>>supposed to then remove the menu bar 10 lines of code later??
>>
>>Can't I interactively customize the main menu via KDevelop?  There must
>>be a way to toggle the inclusion of menus and change menu and button
>>properties.
>>    
>>
>
>That depends on what you mean by "interactively customize". :)
>
Well... I mean anything via KDevelop other than manually editing the 
source code.

>When you created the "generic" template of this project with KDevelop, it
>just
>copied this generic source code from an archive into this project directory.
>From
>there, you can use the text editor to customize all of the source, including
>the menubar
>stuff.  That's the way I code; I lay everything out by writing the code
>directly.
>
Ok, that's fine.  I don't mind manually editing the code.  But will my 
edits be lost by subsequent code generations?  In other words, does 
KDevelop generate my application class code only a single time when the 
project is first created?  Or does it re-generate the code throughout 
the life of the project?

If it generates the code once and I'm free to do with it as I choose, 
I'll just go ahead and modify the code directly.  But if the code is 
regenerated, I want to be sure I make my customizations in a way that 
they will not be overwritten by the code generator in the future.

>If you want to be able to do it like Qt Designer, then you'll have to use Qt
>Designer.  What
>you can do, however, is create this "menu" in Qt Designer and save it as a
>.ui file.  Then, in
>KDevelop, if you add the .ui file to your project, it will take care of the
>compilation issues for you.
>That sounds to me like more what you want to do.
>
Yes, it does.  So if I add my "menu.ui" file to the project, KDevelop 
will automatically replace the default menu with the one I create??

Thanks again!

-Steve


-- 
--
Stephen Dzurenko
Research Engineer / Scientist Associate

Advanced Sonar Division / Advanced Technology Laboratory

Applied Research Laboratories
The University of Texas at Austin
P.O. Box 8029
Austin, Texas  78713-8029
10000 Burnet Road 78758-4423




-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list