本文整理汇总了C++中setXMLFile函数的典型用法代码示例。如果您正苦于以下问题:C++ setXMLFile函数的具体用法?C++ setXMLFile怎么用?C++ setXMLFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setXMLFile函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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()));
}
开发者ID:AndreiDuma,项目名称:marble,代码行数:29,代码来源:KdeMainWindow.cpp
示例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);
}
开发者ID:KDE,项目名称:cantor,代码行数:7,代码来源:invertmatrixassistant.cpp
示例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);
}
开发者ID:foren197316,项目名称:calligra,代码行数:28,代码来源:View.cpp
示例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() ) );
}
开发者ID:snowy97,项目名称:marble,代码行数:25,代码来源:KdeMainWindow.cpp
示例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);
}
开发者ID:serghei,项目名称:kde3-kdemultimedia,代码行数:29,代码来源:player.cpp
示例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
}
开发者ID:Flameeyes,项目名称:atmosphere,代码行数:35,代码来源:atmosphere.cpp
示例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;
}
开发者ID:serghei,项目名称:kde3-kdevelop,代码行数:26,代码来源:antprojectpart.cpp
示例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);
}
开发者ID:KDE,项目名称:cantor,代码行数:7,代码来源:eigenvaluesassistant.cpp
示例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*)) );
}
开发者ID:serghei,项目名称:kde3-kdevelop,代码行数:34,代码来源:makeviewpart.cpp
示例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)));
}
开发者ID:serghei,项目名称:kde3-kdebase,代码行数:32,代码来源:plugin_part.cpp
示例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();
}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:30,代码来源:krichtexteditpart.cpp
示例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;
}
开发者ID:UpWind,项目名称:devel,代码行数:8,代码来源:nmeagps.cpp
示例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();
}
开发者ID:UIKit0,项目名称:calligra,代码行数:8,代码来源:CAuView.cpp
示例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"));
}
开发者ID:KDE,项目名称:choqok,代码行数:8,代码来源:nowlistening.cpp
示例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");
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:9,代码来源:ScriptingPart.cpp
示例16: setInstance
TestPlugin::TestPlugin(Kontact::Core *_core, const char *name, const QStringList &)
: Kontact::Plugin(_core, _core, name)
{
setInstance(TestPluginFactory::instance());
insertNewAction(new KAction("Test", 0, this, SLOT(slotTestMenu()), actionCollection(), "edit_test"));
setXMLFile("kptestplugin.rc");
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:9,代码来源:test_plugin.cpp
示例17: KHTMLPart
DocumentationViewer::DocumentationViewer(QWidget *parent) : KHTMLPart(parent, parent, BrowserViewGUI)
{
m_hpos = 0;
QString rc = KGlobal::dirs()->findResource("appdata", "docpartui.rc");
setXMLFile(rc);
KStandardAction::back(this, SLOT(back()), (QObject*)actionCollection());
KStandardAction::forward(this, SLOT(forward()), (QObject*)actionCollection());
KStandardAction::home(this, SLOT(home()), (QObject*)actionCollection());
}
开发者ID:fagu,项目名称:kileip,代码行数:9,代码来源:docpart.cpp
示例18: KHTMLPart
DocumentationViewer::DocumentationViewer(QWidget *parent) : KHTMLPart(parent, parent, BrowserViewGUI)
{
m_hpos = 0;
QString rc = QStandardPaths::locate(QStandardPaths::DataLocation, "docpartui.rc");
setXMLFile(rc);
KStandardAction::back(this, SLOT(back()), (QObject*)actionCollection());
KStandardAction::forward(this, SLOT(forward()), (QObject*)actionCollection());
KStandardAction::home(this, SLOT(home()), (QObject*)actionCollection());
}
开发者ID:KDE,项目名称:kile,代码行数:9,代码来源:docpart.cpp
示例19: setComponentName
CsvExporterPlugin::CsvExporterPlugin() :
KMyMoneyPlugin::Plugin(nullptr, "csvexport"/*must be the same as X-KDE-PluginInfo-Name*/)
{
setComponentName("kmm_csvexport", i18n("CSV exporter"));
setXMLFile("kmm_csvexport.rc");
createActions();
// For information, announce that we have been loaded.
qDebug("KMyMoney csvexport plugin loaded");
}
开发者ID:KDE,项目名称:kmymoney,代码行数:9,代码来源:csvexporterplugin.cpp
示例20: KoScriptingPart
KPlatoScriptingPart::KPlatoScriptingPart(QObject *parent, const QVariantList &args)
: KoScriptingPart(new Scripting::Module(parent))
{
Q_UNUSED(args);
//setComponentData(ScriptingPart::componentData());
setXMLFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation, "plan/viewplugins/scripting.rc"), true);
debugPlanScripting <<"PlanScripting plugin. Class:" << metaObject()->className() <<", Parent:" <<(parent?parent->metaObject()->className():"0");
}
开发者ID:UIKit0,项目名称:calligra,代码行数:9,代码来源:ScriptingPart.cpp
注:本文中的setXMLFile函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论