本文整理汇总了C++中DCOPClient::connectDCOPSignal方法的典型用法代码示例。如果您正苦于以下问题:C++ DCOPClient::connectDCOPSignal方法的具体用法?C++ DCOPClient::connectDCOPSignal怎么用?C++ DCOPClient::connectDCOPSignal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DCOPClient
的用法示例。
在下文中一共展示了DCOPClient::connectDCOPSignal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KPanelApplet
QuickLauncher::QuickLauncher(const TQString& configFile, Type type, int actions,
TQWidget *parent, const char *name) :
KPanelApplet(configFile, type, actions, parent, name)
{
DCOPObject::setObjId("QuickLauncherApplet");
DEBUGSTR << endl << endl << endl << "------------" << flush;
DEBUGSTR << "QuickLauncher::QuickLauncher(" << configFile << ",...)" <<
endl << flush;
m_settings = new Prefs(sharedConfig());
m_settings->readConfig();
m_needsSave = false;
m_needsRefresh = false;
m_refreshEnabled = false;
m_configDialog = 0;
m_popup = 0;
m_appletPopup = 0;
m_removeAppsMenu = 0;
m_dragAccepted = false;
m_buttons = new ButtonGroup;
m_manager = new FlowGridManager;
m_newButtons = 0;
m_oldButtons = 0;
m_dragButtons = 0;
m_configAction = new TDEAction(i18n("Configure Quicklauncher..."), "configure", TDEShortcut(),
TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), TQT_TQOBJECT(this));
m_saveTimer = new TQTimer(this, "m_saveTimer");
connect(m_saveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(saveConfig()));
m_popularity = new PopularityStatistics();
setBackgroundOrigin(AncestorOrigin);
loadConfig();
buildPopupMenu();
m_minPanelDim = std::max(16, m_settings->iconDimChoices()[1]);
refreshContents();
setRefreshEnabled(true);
setAcceptDrops(true);
//TQToolTip::add(this, i18n("Drop applications here"));
DEBUGSTR << " QuickLauncher::QuickLauncher(" << configFile <<
",...) END" << endl << flush;
DCOPClient *dcopClient = TDEApplication::dcopClient();
dcopClient->connectDCOPSignal(0, "appLauncher",
"serviceStartedByStorageId(TQString,TQString)",
"QuickLauncherApplet",
"serviceStartedByStorageId(TQString,TQString)",
false);
kdDebug() << "Quicklauncher registered DCOP signal" << endl;
}
示例2: PanelServiceMenu
PanelKMenu::PanelKMenu()
: PanelServiceMenu(QString::null, QString::null, 0, "KMenu")
, bookmarkMenu(0)
, bookmarkOwner(0)
{
static const QCString dcopObjId("KMenu");
DCOPObject::setObjId(dcopObjId);
// set the first client id to some arbitrarily large value.
client_id = 10000;
// Don't automatically clear the main menu.
disableAutoClear();
actionCollection = new KActionCollection(this);
setCaption(i18n("K Menu"));
connect(Kicker::the(), SIGNAL(configurationChanged()),
this, SLOT(configChanged()));
DCOPClient *dcopClient = KApplication::dcopClient();
dcopClient->connectDCOPSignal(0, "appLauncher",
"serviceStartedByStorageId(QString,QString)",
dcopObjId,
"slotServiceStartedByStorageId(QString,QString)",
false);
}