本文整理汇总了C++中setXMLFile函数的典型用法代码示例。如果您正苦于以下问题:C++ setXMLFile函数的具体用法?C++ setXMLFile怎么用?C++ setXMLFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setXMLFile函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KXmlGuiWindow
MainWindow::MainWindow( const QString& marbleDataPath, QWidget *parent )
: KXmlGuiWindow( parent )
{
m_part = new MarblePart( this, this, QVariantList() << marbleDataPath );
setCentralWidget( m_part->widget() );
insertChildClient( m_part );
setXMLFile( "marbleui.rc" );
setStandardToolBarMenuEnabled( true );
createGUI( 0 );
QList<QAction*> panelActions = m_part->controlView()->setupDockWidgets( this );
m_part->unplugActionList( "panels_actionlist" );
m_part->plugActionList( "panels_actionlist", panelActions );
// Creating the plugin menus
m_part->createInfoBoxesMenu();
m_part->createOnlineServicesMenu();
m_part->createRenderPluginActions();
m_part->createFolderList();
setAutoSaveSettings();
connect( marbleWidget(), SIGNAL(themeChanged(QString)),
this, SLOT(setMapTitle()));
}
示例2: setXMLFile
void InvertMatrixAssistant::initActions()
{
setXMLFile(QLatin1String("cantor_invert_matrix_assistant.rc"));
QAction* invertmatrix=new QAction(i18n("Invert Matrix"), actionCollection());
actionCollection()->addAction(QLatin1String("invertmatrix_assistant"), invertmatrix);
connect(invertmatrix, &QAction::triggered, this, &InvertMatrixAssistant::requested);
}
示例3: QWidget
View::View(RootSection *document, MainWindow* parent)
: QWidget(parent)
, m_doc(document)
, m_canvas(0)
, m_activeSection(0)
, m_mainWindow(parent)
, m_cutController(0)
, m_copyController(0)
{
setXMLFile("braindumpview.rc");
m_doc->viewManager()->addView(this);
m_editPaste = actionCollection()->addAction(KStandardAction::Paste, "edit_paste", this, SLOT(editPaste()));
m_editCut = actionCollection()->addAction(KStandardAction::Cut, "edit_cut", 0, 0);
m_editCopy = actionCollection()->addAction(KStandardAction::Copy, "edit_copy", 0, 0);
initGUI();
initActions();
loadExtensions();
if(m_doc->sections().count() > 0) {
setActiveSection(m_doc->sections()[0]);
} else {
setActiveSection(0);
}
m_doc->viewManager()->viewHasFocus(this);
}
示例4: KXmlGuiWindow
MainWindow::MainWindow( const QString& marbleDataPath, QWidget *parent )
: KXmlGuiWindow( parent )
{
m_part = new MarblePart( this, this, QVariantList() << marbleDataPath );
setCentralWidget( m_part->widget() );
insertChildClient( m_part );
setXMLFile( "marbleui.rc" );
setStandardToolBarMenuEnabled( true );
createGUI( 0 );
// Creating the plugin menus
m_part->createInfoBoxesMenu();
m_part->createOnlineServicesMenu();
m_part->createFolderList();
setAutoSaveSettings();
connect( marbleWidget(), SIGNAL( themeChanged( QString ) ),
this, SLOT( setMapTitle() ) );
}
示例5: engine
Kaboodle::Player::Player(QWidget *widgetParent, const char *widgetName,
QObject *parent, const char *name)
: KMediaPlayer::Player(widgetParent, widgetName, parent, name)
, engine(new Engine(this))
, widget(new View(widgetParent, widgetName, this))
, uncompleted(true)
, embedded(false)
{
setInstance(KaboodleFactory::instance());
connect(&ticker, SIGNAL(timeout()), SLOT(tickerTimeout()));
ticker.start(500);
setState(Empty);
playAction = new KAction(i18n("&Play"), 0, this, SLOT(play()), actionCollection(), "play");
pauseAction = new KAction(i18n("&Pause"), 0, this, SLOT(pause()), actionCollection(), "pause");
stopAction = new KAction(i18n("&Stop"), 0, this, SLOT(stop()), actionCollection(), "stop");
loopAction = new KToggleAction(i18n("&Looping"), 0, this, SLOT(loop()), actionCollection(), "loop");
stopAction->setEnabled(false);
playAction->setEnabled(false);
pauseAction->setEnabled(false);
connect(this, SIGNAL(loopingChanged(bool)), loopAction, SLOT(setChecked(bool)));
KParts::Part::setWidget(widget);
setXMLFile("kaboodlepartui.rc");
extension = new BrowserExtension(this);
extension->setURLDropHandlingEnabled(true);
}
示例6: KMainWindow
/*!
\brief Default constructor
This is the default constructor for the main class of the application.
It adds the standard actions and create the ATMOSphere's KCM.
*/
ATMOSphere::ATMOSphere()
: KMainWindow( 0, "ATMOSphere" )
{
// set the shell's ui resource file
setXMLFile("atmosphereui.rc");
KStdAction::keyBindings(this, SLOT( slotConfigureKeys() ), actionCollection() );
KStdAction::configureNotifications(this, SLOT(slotConfigureNotifications()), actionCollection());
KStdAction::configureToolbars(this, SLOT(slotConfigureToolBars()), actionCollection());
KStdAction::quit(this, SLOT(close()), actionCollection());
KStdAction::preferences(this, SLOT(setup()), actionCollection());
createGUI();
kcmDialog = new KCMultiDialog( KCMultiDialog::Plain, "ATMOSphere settings", this, "kcmDialog", true);
kcmDialog->addModule("kcmatmosphere");
iv = new KIconView(this);
setCentralWidget(iv);
loadDevices();
connect(iv, SIGNAL( executed(QIconViewItem*) ), this, SLOT(deviceOpened(QIconViewItem*)));
#ifdef HAVE_TFTP
tftpServer = new TFTP::Server( QHostAddress() );
connect(tftpServer, SIGNAL( receivedFile(QIODevice*,const QString) ), this, SLOT(tftpFileReceived(QIODevice *, const QString)));
connect(tftpServer, SIGNAL( sentFile(QIODevice*, QString) ), this, SLOT(tftpFileSent(QIODevice *, QString)));
#endif
}
示例7: KDevBuildTool
AntProjectPart::AntProjectPart(QObject *parent, const char *name, const QStringList &)
: KDevBuildTool(&data, parent, name ? name : "AntProjectPart")
{
setInstance(AntProjectFactory::instance());
setXMLFile("kdevantproject.rc");
m_buildProjectAction = new KAction(i18n("&Build Project"), "make_kdevelop", Key_F8,
this, SLOT(slotBuild()),
actionCollection(), "build_build" );
m_buildProjectAction->setToolTip(i18n("Build project"));
m_buildProjectAction->setWhatsThis(i18n("<b>Build project</b><p>Executes <b>ant dist</b> command to build the project."));
KActionMenu *menu = new KActionMenu(i18n("Build &Target"),
actionCollection(), "build_target" );
menu->setToolTip(i18n("Build target"));
menu->setWhatsThis(i18n("<b>Build target</b><p>Executes <b>ant target_name</b> command to build the specified target."));
m_targetMenu = menu->popupMenu();
connect(m_targetMenu, SIGNAL(activated(int)), this, SLOT(slotTargetMenuActivated(int)));
connect(core(), SIGNAL(projectConfigWidget(KDialogBase*)), this, SLOT(projectConfigWidget(KDialogBase*)));
connect(core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), this, SLOT(contextMenu(QPopupMenu *, const Context *)));
m_antOptionsWidget = 0;
}
示例8: setXMLFile
void EigenValuesAssistant::initActions()
{
setXMLFile(QLatin1String("cantor_eigenvalues_assistant.rc"));
QAction* eigenvalues=new QAction(i18n("Compute Eigenvalues"), actionCollection());
actionCollection()->addAction(QLatin1String("eigenvalues_assistant"), eigenvalues);
connect(eigenvalues, &QAction::triggered, this, &EigenValuesAssistant::requested);
}
示例9: KDevMakeFrontend
MakeViewPart::MakeViewPart(QObject *parent, const char *name, const QStringList &)
: KDevMakeFrontend(&data, parent, name)
{
setInstance(MakeViewFactory::instance());
setXMLFile("kdevmakeview.rc");
m_dcop = new KDevMakeFrontendIface(this);
m_widget = new MakeWidget(this);
m_widget->setIcon( SmallIcon("exec") );
m_widget->setCaption(i18n("Messages Output"));
QWhatsThis::add(m_widget, i18n("<b>Messages output</b><p>"
"The messages window shows the output of the compiler and "
"used build tools like make, ant, uic, dcopidl etc. "
"For compiler error messages, click on the error message. "
"This will automatically open the source file and set the "
"cursor to the line that caused the compiler error/warning."));
mainWindow()->embedOutputView(m_widget, i18n("Messages"), i18n("Compiler output messages"));
KAction *action;
action = new KAction( i18n("&Next Error"), Key_F4, m_widget, SLOT(nextError()),
actionCollection(), "view_next_error");
action->setToolTip( i18n("Go to the next error") );
action->setWhatsThis(i18n("<b>Next error</b><p>Switches to the file and line where the next error was reported from."));
action = new KAction( i18n("&Previous Error"), SHIFT+Key_F4, m_widget, SLOT(prevError()),
actionCollection(), "view_previous_error");
action->setToolTip( i18n("Go to the previous error") );
action->setWhatsThis(i18n("<b>Previous error</b><p>Switches to the file and line where the previous error was reported from."));
connect( core(), SIGNAL(stopButtonClicked(KDevPlugin*)),
this, SLOT(slotStopButtonClicked(KDevPlugin*)) );
}
示例10: _widget
PluginPart::PluginPart(QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const QStringList &args)
: KParts::ReadOnlyPart(parent, name), _widget(0), _args(args), _destructed(0L)
{
setInstance(PluginFactory::instance());
kdDebug(1432) << "PluginPart::PluginPart" << endl;
// we have to keep the class name of KParts::PluginBrowserExtension
// to let khtml find it
_extension = static_cast< PluginBrowserExtension * >(new KParts::BrowserExtension(this));
_liveconnect = new PluginLiveConnectExtension(this);
// Only create this if we have no parent since the parent part is
// responsible for "Save As" then
if(!parent || !parent->inherits("Part"))
{
new KAction(i18n("&Save As..."), CTRL + Key_S, this, SLOT(saveAs()), actionCollection(), "saveDocument");
setXMLFile("nspluginpart.rc");
}
// create
_loader = NSPluginLoader::instance();
_callback = new NSPluginCallback(this);
// create a canvas to insert our widget
_canvas = new PluginCanvasWidget(parentWidget, widgetName);
//_canvas->setFocusPolicy( QWidget::ClickFocus );
_canvas->setFocusPolicy(QWidget::WheelFocus);
_canvas->setBackgroundMode(QWidget::NoBackground);
setWidget(_canvas);
_canvas->show();
QObject::connect(_canvas, SIGNAL(resized(int, int)), this, SLOT(pluginResized(int, int)));
}
示例11: m_capabilities
KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *parent, const char *name, int capabilities )
: KParts::ReadOnlyPart( parent, name ? name : "rich_text_part" ),
m_capabilities( capabilities ),
m_richTextEnabled( true )
{
// we need an instance
setInstance( KopeteRichTextEditPartFactory::instance() );
editor = new KopeteTextEdit( parent );
editor->setReadOnly( false );
setWidget( editor );
m_richTextAvailable = (
m_capabilities & Kopete::Protocol::RichFormatting ||
m_capabilities & Kopete::Protocol::Alignment ||
m_capabilities & Kopete::Protocol::RichFont ||
m_capabilities & Kopete::Protocol::RichColor
);
createActions();
setXMLFile( "kopeterichtexteditpartfull.rc" );
enableRichText->setEnabled( m_richTextAvailable );
enableRichText->setChecked( m_richTextAvailable );
slotSetRichTextEnabled( m_richTextAvailable );
//Set colors, font
readConfig();
}
示例12: file
QString NMEAGPS::loadFrom(SettingsManager &sm){
QString fileVer = CorePlugin::loadFrom(sm);
boat.fileName = sm.loadProperty("polarXml", "");
QFile file(boat.fileName);
if(file.exists())
setXMLFile(false);
return fileVer;
}
示例13: setComponentName
CAuView::CAuView(KoPart *part, KWDocument *document, QWidget *parent)
:KWView(part, document, parent)
{
setComponentName(CAuFactory::componentData().componentName(), CAuFactory::componentData().componentDisplayName());
setXMLFile("author.rc");
setupActions();
}
示例14: QAction
NowListening::NowListening(QObject *parent, const QList<QVariant> &)
: Choqok::Plugin(QLatin1String("choqok_nowlistening"), parent)
{
QAction *action = new QAction(QIcon::fromTheme(QLatin1String("media-playback-start")), i18n("Now Listening"), this);
actionCollection()->addAction(QLatin1String("nowListening"), action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotPrepareNowListening()));
setXMLFile(QLatin1String("nowlisteningui.rc"));
}
示例15: KoScriptingPart
KPlatoScriptingPart::KPlatoScriptingPart(QObject* parent, const QStringList& args)
: KoScriptingPart(new Scripting::Module(parent), args)
, d(new Private())
{
//setComponentData(ScriptingPart::componentData());
setXMLFile(KStandardDirs::locate("data", "plan/viewplugins/scripting.rc"), true);
kDebug(planScriptingDebugArea()) <<"PlanScripting plugin. Class:" << metaObject()->className() <<", Parent:" <<(parent?parent->metaObject()->className():"0");
}