bool EmoEditPlugin::load() { m_theme.reset(new EmoticonsTheme(Emoticons::theme())); connect(ChatLayer::instance(), SIGNAL(sessionCreated(qutim_sdk_0_3::ChatSession*)), this, SLOT(onSessionCreated(qutim_sdk_0_3::ChatSession*))); foreach (ChatSession *session, ChatLayer::instance()->sessions()) onSessionCreated(session); return true; }
IndicatorService::IndicatorService() : desktopName( QUTIM_DESKTOP_FILE ), indicateServer(QIndicate::Server::defaultInstance()), quitButton(new QIndicate::Indicator) { indicateServer->setType("message.im"); indicateServer->setDesktopFile(desktopName); indicateServer->show(); connect(indicateServer, SIGNAL(serverDisplay()), SLOT(showMainWindow())); connect(qutim_sdk_0_3::ChatLayer::instance(), SIGNAL(sessionCreated(qutim_sdk_0_3::ChatSession*)), SLOT(onSessionCreated(qutim_sdk_0_3::ChatSession*))); //QImage icon = qutim_sdk_0_3::Icon("qutim").pixmap(64).toImage(); qApp->setQuitOnLastWindowClosed(false); /* Quit Button */ quitButton->setNameProperty(QT_TRANSLATE_NOOP("Plugin", "Close qutIM")); QImage icon = qutim_sdk_0_3::Icon("application-exit").pixmap(64).toImage(); connect(quitButton, SIGNAL(display(QIndicate::Indicator*)), qApp, SLOT(quit())); quitButton->setIconProperty(icon); quitButton->show(); foreach (qutim_sdk_0_3::ChatSession *session, qutim_sdk_0_3::ChatLayer::instance()->sessions()) onSessionCreated(session); }