1 2 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> 3 <kpartgui name="Konqueror" version="1"> 4 <MenuBar> 5 <Menu name="file"><Text>&File</Text> 6 <Action name="find"/> 7 <Separator/> 8 <Action name="close"/> 9 </Menu> 10 <Menu name="edit"><Text>&Edit</Text> 11 <Action name="cut"/> 12 <Action name="copy"/> 13 <Separator/> 14 <Merge/> 15 <Separator/> 16 </Menu> 17 <Merge/> 18 </MenuBar> 19 <ToolBar fullWidth="true" name="mainToolBar"><Text>Main</Text> 20 <Action name="cut"/> 21 <Action name="copy"/> 22 <Separator/> 23 <Merge/> 24 <Separator/> 25 <Action name="animated_logo"/> 26 </ToolBar> 27 <ToolBar name="locationToolBar"><Text>Location</Text> 28 <Action name="toolbar_url_combo"/> 29 </ToolBar> 30 </kpartgui> 31 |
1 2 <Merge name="MyPart"/> 3 .... 4 <Merge /> 5 |
1 2 Shell::Shell() 3 { 4 setXMLFile( "ghostviewtest.rc" ); 5 KAction * paQuit = new KAction( i18n( "&Quit" ), "exit", 0, 6 this, SLOT( close() ), actionCollection(), "file_quit" ); 7 8 KLibFactory *factory = KLibLoader::self()->factory( "libkghostview" ); 9 if (factory) // Try to find libkghostview 10 { 11 m_gvpart = (KParts::ReadOnlyPart *)factory->create( this, "kgvpart", 12 "KParts::ReadOnlyPart" ); // Create the part 13 setView( m_gvpart->widget() ); // Set the main widget 14 createGUI( m_gvpart ); // Integrate its GUI 15 } 16 else 17 kdFatal() << "No libkghostview found !" << endl; 18 } 19 |