Пример #1
0
QtAddWengoAccount::QtAddWengoAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler)
	:ILogin(qtLoginDialog, cUserProfileHandler){

	_ui = new Ui::AddWengoAccount();
	_ui->setupUi(this);

	LANGUAGE_CHANGE(this);

	WidgetBackgroundImage::setBackgroundImage(_ui->loginLabel, ":pics/headers/login.png", WidgetBackgroundImage::AdjustHeight);

	SAFE_CONNECT(_ui->loginButton, SIGNAL(clicked()), SLOT(loginClicked()));
	SAFE_CONNECT(_ui->backButton, SIGNAL(clicked()), SLOT(goBack()));
	SAFE_CONNECT_RECEIVER(_ui->cancelButton, SIGNAL(clicked()), _loginDialog, SLOT(reject()));
	SAFE_CONNECT(_ui->createWengoAccountLabel, SIGNAL(linkActivated(const QString &)), SLOT(createAccountButtonClicked()));
	SAFE_CONNECT(_ui->helpLabel, SIGNAL(linkActivated(const QString &)), SLOT(helpButtonClicked()));
	SAFE_CONNECT(_ui->forgotPasswordLabel, SIGNAL(linkActivated(const QString &)), SLOT(forgotPasswordButtonClicked()));
}
Пример #2
0
void QtSystray::setTrayMenu() {
	_trayMenu->clear();

	//openAction
#if defined(OS_MACOSX)
	// On Mac OS X, clicking the Dock icon should show the application thus the
	// 'Open WengoPhone' entry is not necessary. We get the Dock Icon click event
	// from our QtMacApplication class.
	QtMacApplication * qMacApp = dynamic_cast<QtMacApplication *>(QApplication::instance());
	SAFE_CONNECT_RECEIVER(qMacApp, SIGNAL(applicationMustShow()), _qtWengoPhone->getWidget(), SLOT(show()));
#endif
	_startNew = new QMenu(tr("Start New"));
	
	_newCall = new QAction(tr("Call"), _startNew);
	_newConference = new QAction(tr("Conference Call"), _startNew);
	//_newInstantMessage = new QMenu(tr("Instant Message"));
	_newInstantMessage = new QAction(tr("Instant Message"), _startNew);
	_newGroupChat = new QAction(tr("Group Chat"), _startNew);
	_newTextMessage = new QAction(tr("Text Message"), _startNew);
	_newGroupTextMessage = new QAction(tr("Group Text Message"), _startNew);
	_newEmail = new QAction(tr("Email"), _startNew);
	_newGroupEmail = new QAction(tr("Group Email"), _startNew);
	_newSendFile = new QAction(tr("Send File"), _startNew);
	_newSendFax = new QAction(tr("Send Fax"), _startNew);

	SAFE_CONNECT_RECEIVER(_newCall, SIGNAL(triggered()), _qtToolBar, SLOT(showKeyTab()));
	SAFE_CONNECT_RECEIVER(_newConference, SIGNAL(triggered()), _qtToolBar, SLOT(createConferenceCall()));
	/*_newInstantMessage->clear();
	SAFE_CONNECT(_newInstantMessage, SIGNAL(triggered(QAction *)), SLOT(startChat(QAction *)));
	QtContactMenu::populateChatMenu(_newInstantMessage, _qtWengoPhone->getCWengoPhone());*/
	_newInstantMessage->setDisabled(true);
	_newGroupChat->setDisabled(true);
	_newTextMessage->setDisabled(true);
	_newGroupTextMessage->setDisabled(true);
	_newEmail->setDisabled(true);
	_newGroupEmail->setDisabled(true);
	_newSendFile->setDisabled(true);
	_newSendFax->setDisabled(true);
	
	_startNew->addAction(_newCall);
	_startNew->addAction(_newConference);
	_startNew->addAction(_newInstantMessage);
	//_startNew->addMenu(_newInstantMessage);
	_startNew->addAction(_newGroupChat);
	_startNew->addAction(_newTextMessage);
	_startNew->addAction(_newGroupTextMessage);
	_startNew->addAction(_newEmail);
	_startNew->addAction(_newGroupEmail);
	_startNew->addAction(_newSendFile);
	_startNew->addAction(_newSendFax);	

	_recentContacts = new QMenu(tr("Recent Contacts"));
	_viewConversations = new QAction(tr("View Conversations"), _trayMenu);
	_showContactList = new QAction(tr("Show Contact List"), _trayMenu);
	_settings = new QAction(tr("Settings"), _trayMenu);
	_signOut = new QAction(tr("Sign Out"), _trayMenu);
	_quit = new QAction(tr("Quit @product@"), _trayMenu);
	
	_recentContacts->setDisabled(true);
	SAFE_CONNECT_RECEIVER(_viewConversations, SIGNAL(triggered()), _qtToolBar, SLOT(showHistory()));
	SAFE_CONNECT_RECEIVER(_showContactList, SIGNAL(triggered()), _qtToolBar, SLOT(showContactsTab()));
	SAFE_CONNECT_RECEIVER(_settings, SIGNAL(triggered()), _qtToolBar, SLOT(showConfig()));
//	SAFE_CONNECT_RECEIVER(_signOut, SIGNAL(triggered()), _qtToolBar, SLOT(logOff()));
//	SAFE_CONNECT_RECEIVER(_quit, SIGNAL(triggered()), _qtWengoPhone, SLOT(prepareToExitApplication()));	
	SAFE_CONNECT_RECEIVER(_signOut, SIGNAL(triggered()), _qtWengoPhone, SLOT(logOff()));					//VOXOX - JRT - 2009.07.13 
	SAFE_CONNECT_RECEIVER(_quit,	SIGNAL(triggered()), _qtWengoPhone, SLOT(exitApplication()));			//VOXOX - JRT - 2009.07.13 
	
	if(!_qtToolBar->getUserIsLogged()){
		_startNew->setDisabled(true);
		_viewConversations->setDisabled(true);
		_showContactList->setDisabled(true);
		_settings->setDisabled(true);
		_signOut->setDisabled(true);
	}

	_trayMenu->addMenu(_startNew);
	_trayMenu->addMenu(_recentContacts);
	_trayMenu->addAction(_viewConversations);
	_trayMenu->addAction(_showContactList);
	if ( getCUserProfile() ) {
		_trayMenu->addMenu(createStatusMenu());
	}
	_trayMenu->addAction(_settings);
	_trayMenu->addAction(_signOut);
	_trayMenu->addAction(_quit);

	_trayIcon->setPopup(_trayMenu);
}
Пример #3
0
void QtIMAccountSettings::createIMProtocolWidget(QWidget* parent, QtEnumIMProtocol::IMProtocol imProtocol) 
{
	QDialog * imAccountTemplateWindow = new QDialog(parent);

	_ui = new Ui::IMAccountTemplate();
	_ui->setupUi(imAccountTemplateWindow);

	switch (imProtocol) {
	case QtEnumIMProtocol::IMProtocolMSN: {
		_imAccountPlugin = new QtMSNSettings(_userProfile, _imAccount, imAccountTemplateWindow);
		break;
	}
	case QtEnumIMProtocol::IMProtocolMYSPACE: {
		_imAccountPlugin = new QtMySpaceSettings(_userProfile, _imAccount, imAccountTemplateWindow);
		break;
	}

	case QtEnumIMProtocol::IMProtocolFacebook: {
		_imAccountPlugin = new QtFacebookSettings(_userProfile, _imAccount, imAccountTemplateWindow);
		break;
	}

   	case QtEnumIMProtocol::IMProtocolTwitter: {
		_imAccountPlugin = new QtTwitterSettings(_userProfile, _imAccount, imAccountTemplateWindow);
		break;
	}

    case QtEnumIMProtocol::IMProtocolSkype: {
		_imAccountPlugin = new QtSkypeSettings(_userProfile, _imAccount, imAccountTemplateWindow);
		break;
	}

	case QtEnumIMProtocol::IMProtocolYahoo: {
		_imAccountPlugin = new QtYahooSettings(_userProfile, _imAccount, imAccountTemplateWindow);
		break;
	}

	case QtEnumIMProtocol::IMProtocolAIM: {
		_imAccountPlugin = new QtAIMSettings(_userProfile, _imAccount, imAccountTemplateWindow);
		break;
	}

	case QtEnumIMProtocol::IMProtocolICQ: {
		_imAccountPlugin = new QtICQSettings(_userProfile, _imAccount, imAccountTemplateWindow);
		break;
	}

	case QtEnumIMProtocol::IMProtocolJabber: {
		_imAccountPlugin = new QtJabberSettings(_userProfile, _imAccount, imAccountTemplateWindow);
		break;
	}

	case QtEnumIMProtocol::IMProtocolGoogleTalk: {
		_imAccountPlugin = new QtGoogleTalkSettings(_userProfile, _imAccount, imAccountTemplateWindow);
		break;
	}

	case QtEnumIMProtocol::IMProtocolVoxOx:
		assert(false);								//VOXOX - JRT - 2009.07.01 - if we got here, then some one changed QtEnumIMProtocol.
		break;

	default:
		LOG_FATAL("unknown IM protocol=" + String::fromNumber(imProtocol));
	}

	SAFE_CONNECT_RECEIVER(_ui->saveButton,   SIGNAL(clicked()), _imAccountPlugin,		 SLOT(checkAndSave()));
	SAFE_CONNECT_RECEIVER(_ui->cancelButton, SIGNAL(clicked()), imAccountTemplateWindow, SLOT(reject()));

	QWidget * imProtocolWidget = _imAccountPlugin->getWidget();
	QString styleSheet("QLabel,QCheckBox{color:#343434;}");
	imProtocolWidget->setStyleSheet(styleSheet);
	Widget::createLayout(_ui->settingsGroupBox)->addWidget(imProtocolWidget);
	_ui->settingsGroupBox->setTitle(imProtocolWidget->windowTitle());

	imAccountTemplateWindow->setWindowTitle(imProtocolWidget->windowTitle());
	imAccountTemplateWindow->exec();
}