Ejemplo n.º 1
0
Profile::Profile(ProfilePlugin *profilePlugin, QGraphicsItem *parent) :
    MContentItem(MContentItem::IconAndTwoTextLabels, parent),
    plugin(profilePlugin)
{
    setTitle("Profile");
    setSubtitle("Silent");
    setObjectName("StatusIndicatorMenuExtensionContentItem");
    setImageID("icon-m-profile-silent");
    connect(this, SIGNAL(clicked()), this, SLOT(showProfileDialog()));
}
Ejemplo n.º 2
0
// Child windows functions
void MainWindow::createChildWindows()
{
	currentRecipient = ALL_FRIENDS_ID;

	// Creating drawing window
	drawingWindow = new DrawingWindow(this);

	connect(drawingWindow, SIGNAL(clipartWindowRequest()), this, SLOT(onShowClipart()));
	connect(drawingWindow, SIGNAL(messageSent()), this, SLOT(onMessageSent()));
	connect(drawingWindow, SIGNAL(replyChanged()), tvWidget, SLOT(replyChanged()));
	
	drawingWindow->updatePosition(this);

	historyWindow = new HistoryWindow(this);
	historyWindow->setTvWidget(tvWidget);

	connect(historyWindow, SIGNAL(beginOfPreview(const MessageKey &)), tvWidget, SLOT(showHistoryMessage(const MessageKey &)));
	connect(historyWindow, SIGNAL(endOfPreview()), tvWidget, SLOT(stopShowingHistory()));
	connect(historyWindow, SIGNAL(clicked(const MessageKey &)), tvWidget, SLOT(scrollToMessage(const MessageKey &)));
	connect(historyWindow, SIGNAL(deleteMessages(const QList<MessageKey> &)), tvWidget, SLOT(deleteMessages(const QList<MessageKey> &)));
	connect(historyWindow, SIGNAL(saveMessage()), tvWidget, SLOT(saveMessage()));
	connect(historyWindow, SIGNAL(copyMessage()), tvWidget, SLOT(copyMessage()));

	connect(tvWidget, SIGNAL(publishRequest(const MessageKey &)), historyWindow, SLOT(publishMessage(const MessageKey &)));

	historyWindow->updatePosition(this);

	contactList = new NewContactListWindow(this);
	contactList->updatePosition(this);
	contactList->initAutoUpdater(&autoUpdater);
	
	// Connect menu signals
	connect(contactList, SIGNAL(goOnline()), this, SLOT(relogon()));
	connect(contactList, SIGNAL(goOffline()), this, SLOT(offline()));
	connect(contactList, SIGNAL(goLogout()), this, SLOT(logout()));
	connect(contactList, SIGNAL(goExit()), this, SLOT(shutDown()));
	connect(contactList, SIGNAL(contactSelected(qint32)), this, SLOT(onContactSelected(qint32)));
	connect(contactList, SIGNAL(contactImageDrop(qint32, const QImage &)), this, SLOT(onContactImageDrop(qint32, const QImage &)));
	connect(contactList, SIGNAL(soundStateChanged(const bool)), this, SLOT(onSoundStateChanged(const bool)));
	connect(contactList, SIGNAL(unreadContacts(int)), contactListButton, SLOT(update(int)));
#ifdef Q_WS_MAC
    connect(contactList, SIGNAL(unreadContacts(int)), DockIconHandler::instance(), SLOT(unreadCountChanged(int)));
#endif
	connect(contactList, SIGNAL(historyCleared()), tvWidget, SLOT(reload()));

	connect(welcomeWidget, SIGNAL(showProfileDialog()), contactList, SLOT(onShowProfileDialog()));
	connect(welcomeWidget, SIGNAL(showFindFriendsDialog()), contactList, SLOT(onShowFindDialog()));
}