Exemple #1
0
QtFileTransferWidget::QtFileTransferWidget(QWidget * parent)
	: QDialog(parent) {

	//init main widget
	_ui = new Ui::FileTransferDialog();
	_ui->setupUi(this);
	////

#ifdef OS_LINUX
	std::string data = AvatarList::getInstance().getDefaultAvatarPicture().getData();
	QPixmap defaultAvatar;
	defaultAvatar.loadFromData((uchar*)data.c_str(), data.size());
	setWindowIcon(QIcon(defaultAvatar));
#endif

	Config & config = ConfigManager::getInstance().getCurrentConfig();
	if (!config.getFileTransferDownloadFolder().empty()) {
		setDownloadFolder(QString::fromUtf8(config.getFileTransferDownloadFolder().c_str()));
	}

	//connect signals to slots
	SAFE_CONNECT(_ui->cleanButton, SIGNAL(pressed()), SLOT(cleanButtonClicked()));
	SAFE_CONNECT(_ui->pathButton, SIGNAL(pressed()), SLOT(pathButtonClicked()));
	////
}
Exemple #2
0
QtNoWengoAlert::QtNoWengoAlert(QWidget * parent, QtWengoPhone & qtWengoPhone)
    : _qtWengoPhone(qtWengoPhone) {

    _NoWengoAlert = new QDialog(parent);

    _ui = new Ui::NoWengoAlert();
    _ui->setupUi(_NoWengoAlert);

    SAFE_CONNECT(_ui->haveBtn, SIGNAL(clicked()), SLOT(haveButtonClicked()));
    SAFE_CONNECT(_ui->createBtn, SIGNAL(clicked()), SLOT(createButtonClicked()));
}
Exemple #3
0
QtWizardAudio::QtWizardAudio(CWengoPhone & cWengoPhone, QWidget * parent)
	: QWidget(parent),
	_cWengoPhone(cWengoPhone) {

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


	SAFE_CONNECT(_ui->testOutputDeviceButton, SIGNAL(pressed()), SLOT(testOutputDevice()));
	SAFE_CONNECT(_ui->testRingingDeviceButton, SIGNAL(pressed()), SLOT(testRingingDevice()));
	
	readConfig();
}
Exemple #4
0
QtNoWengoAlert::QtNoWengoAlert(QWidget * parent, QtWengoPhone & qtWengoPhone, QString title, QString maintext)
    : _qtWengoPhone(qtWengoPhone) {

    _NoWengoAlert = new QDialog(parent);

    _ui = new Ui::NoWengoAlert();
    _ui->setupUi(_NoWengoAlert);

    _NoWengoAlert->setWindowTitle(title);
    _ui->mainText->setText(maintext);

    SAFE_CONNECT(_ui->haveBtn, SIGNAL(clicked()), SLOT(haveButtonClicked()));
    SAFE_CONNECT(_ui->createBtn, SIGNAL(clicked()), SLOT(createButtonClicked()));
}
Exemple #5
0
void QtVoxWindowManager::showContactManagerWindow(QString  contactId, QtContactProfileWidget::ActionId actionId )
{
	if(!checkIfExist(QtEnumWindowType::ContactManagerWindow))
	{
		//We don't want to open CM if we are deleting.
		if ( actionId != QtContactProfileWidget::Action_Delete )	//VOXOX - JRT - 2009.09.19 
		{
			QtContactProfileWidget *dlg = new QtContactProfileWidget(&_qtWengoPhone.getCWengoPhone(), contactId, actionId, getDefaultParent() );		

			SAFE_CONNECT(dlg, SIGNAL(windowClose(QString )), SLOT(closeWindow(QString )));
			dlg->showWindow();	

			_activeWindowList[dlg->getKey()] = dlg;
		}
	}
	else
	{
		QString id = QtEnumWindowType::toString(QtEnumWindowType::ContactManagerWindow);
		QtVoxWindowInfo * info = getWindow(id);
		if(info!=NULL)
		{
			info->showWindow();

			((QtContactProfileWidget*)info)->setAction( actionId, contactId );		//VOXOX - JRT - 2009.09.19 
		}
	}
}
Exemple #6
0
QtAppearanceSettings::QtAppearanceSettings(CWengoPhone & cWengoPhone, QWidget * parent)
	: QWidget(parent),
	_cWengoPhone(cWengoPhone){

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

	SAFE_CONNECT(_ui->cmbChatStyles, SIGNAL(activated(int)),
		SLOT(updateChatStylePreview()));

	SAFE_CONNECT(_ui->cmbChatStyleVariant, SIGNAL(activated (int)),
		SLOT(updateChatStyleVariant()));

	SAFE_CONNECT(_ui->cmbEmoticonList, SIGNAL(activated(int)),
		SLOT(updateEmoticonsPreview()));

	SAFE_CONNECT(_ui->skinComboBox, SIGNAL(activated(const QString &)),
		SLOT(updateContactListStyle(const QString &)));

	SAFE_CONNECT(_ui->changeKeypadBackground, SIGNAL(clicked()),
		SLOT(changeKeypadBackground()));

	_ui->groupBox->setVisible(false);

	readConfig();
	//updatePreview();
}
Exemple #7
0
QtConferenceCallWidget::QtConferenceCallWidget(QWidget * parent, CWengoPhone & cWengoPhone, IPhoneLine * phoneLine , bool startConference)
	: QWidget(parent), _phoneLine(phoneLine), _cWengoPhone(cWengoPhone),_startConference(startConference)  {

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

	setStyleSheet( QString("QLabel#headerLabel{color: #dce602; font-size: 12px; font-family: \"Tahoma\"; } ")
				  + QString("QLabel#phoneNumber1Label{color: #ffffff; font-weight: bold; font-size: 11px; font-family: \"Tahoma\"; } ")
				  + QString("QLabel#phoneNumber2Label{color: #ffffff; font-weight: bold; font-size: 11px; font-family: \"Tahoma\"; } "));
	
	CUserProfile * currentCUserProfile = _cWengoPhone.getCUserProfileHandler().getCUserProfile();

	_qtVoxOxCallBarFrame1 = new QtVoxOxCallBarFrame();
	_qtVoxOxCallBarFrame1->getVoxOxToolTipLineEdit()->setToolTipDefaultText(DEFAULT_CONFERENCE_MESSAGE);
	/*TODO: VOXOX CHANGE by Rolando, uncomment this code when SQLite be integrated, this method will get phonenumbers of all contacts
	allowing call to contacts according their nicknames, by the moment just could be filled with numbers this component*/
	/*if(currentCUserProfile){
		_qtVoxOxCallBarFrame1->setCUserProfile(currentCUserProfile);
	}*/
	Widget::createLayout(_ui->phoneNumber1Frame)->addWidget(_qtVoxOxCallBarFrame1);
	
	_qtVoxOxCallBarFrame2 = new QtVoxOxCallBarFrame();
	_qtVoxOxCallBarFrame2->getVoxOxToolTipLineEdit()->setToolTipDefaultText(DEFAULT_CONFERENCE_MESSAGE);
	/*TODO: VOXOX CHANGE by Rolando, uncomment this code when SQLite be integrated, this method will get phonenumbers of all contacts
	allowing call to contacts according their nicknames, by the moment just could be filled with numbers this component*/
	/*if(currentCUserProfile){
		_qtVoxOxCallBarFrame2->setCUserProfile(currentCUserProfile);
	}*/
	Widget::createLayout(_ui->phoneNumber2Frame)->addWidget(_qtVoxOxCallBarFrame2);

#ifdef OS_WINDOWS//VOXOX CHANGE by Rolando - 2009.07.13 
	_ui->phoneNumber1Frame->setMinimumHeight(20);//VOXOX CHANGE by Rolando - 2009.07.13	
	_ui->phoneNumber1Frame->setMaximumHeight(25);//VOXOX CHANGE by Rolando - 2009.07.13
	_ui->phoneNumber2Frame->setMinimumHeight(20);//VOXOX CHANGE by Rolando - 2009.07.13	
	_ui->phoneNumber2Frame->setMaximumHeight(25);//VOXOX CHANGE by Rolando - 2009.07.13 
#endif

	populateVoxOxContactsMap();

	//VOXOX CHANGE by Rolando 04-07-09	
	_ui->startButton->setImages(QString(":/pics/phonecall/btn_lrg_call.png"),QString(":/pics/phonecall/btn_lrg_call_press.png"));
	_ui->cancelButton->setImages(QString(":/pics/phonecall/btn_back_arrow_up.png"),QString(":/pics/phonecall/btn_back_arrow_down.png"));//VOXOX CHANGE by Rolando - 2009.07.08 
	
	SAFE_CONNECT(_ui->startButton, SIGNAL(clicked()), SLOT(startClicked()));
	SAFE_CONNECT(_ui->cancelButton, SIGNAL(clicked()), SLOT(cancel()));

}
Exemple #8
0
QtVoxBrowser::QtVoxBrowser(QWidget * parent): QWebView(parent) {


    SAFE_CONNECT (this->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), SLOT(initJavascript() ));

    _jsHandler	= NULL;

}
Exemple #9
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()));
}
Exemple #10
0
VoxOxToolTipLineEdit::VoxOxToolTipLineEdit(QWidget * parent)
	: QLineEdit(0) {

	_parentWidget = parent;//VOXOX CHANGE by Rolando - 2009.05.22 - varible to send focus when it is needed

	LANGUAGE_CHANGE(this);

	_primaryStyleSheet = QString("QWidget{ border: none; color: white; background: black; }");
	_secondaryStyleSheet = QString("QWidget{ border: none; color: gray; background: black; }");

	SAFE_CONNECT(this, SIGNAL(textChanged(QString)), SLOT(textChangedSlot(QString)));//VOXOX CHANGE Rolando 03-24-09
	SAFE_CONNECT(this, SIGNAL(textEdited(QString)), SLOT(textChangedSlot(QString)));//VOXOX CHANGE Rolando 03-24-09

	_shortMessage = "";
	_message = "";

	init();
}
Exemple #11
0
void QtChatRoomInviteDlg::setupGui() {
	_contactListTreeWidget	= _ui->contactListTreeWidget;
	_inviteListWidget		= _ui->inviteListWidget;
	_lineEditChatRoomName	= _ui->lineEditConvName;
	_addPushButton			= _ui->addPushButton;
	_removePushButton		= _ui->removePushButton;
	_startPushButton		= _ui->startPushButton;
	_cancelPushButton		= _ui->cancelPushButton;

	SAFE_CONNECT (_addPushButton,	  SIGNAL(clicked()), SLOT(addToConference()));
	SAFE_CONNECT (_removePushButton,  SIGNAL(clicked()), SLOT(removeFromConference()));
	SAFE_CONNECT (_startPushButton,   SIGNAL(clicked()), SLOT(startConference()));
	SAFE_CONNECT (_cancelPushButton,  SIGNAL(clicked()), SLOT(cancel()));
	
	_contactListTreeWidget->header()->hide();	// Remove the column header

	resize( 528,354 );
}
Exemple #12
0
QtVoxOxCallBarFrame::QtVoxOxCallBarFrame(QWidget * parent): VoxOxFrame(parent) {
	_ui = new Ui::VoxOxCallBarFrame();
	_ui->setupUi(this);

	//VOXOX CHANGE by Rolando - 2009.06.16 
	setStyleSheet(  QString("QtVoxOxCallBarFrame{ background: #000000; border: 1px solid #ababab; border-radius: 5px; } ")
		          + QString( "QComboBox#callBarComboBox{ border: 1px solid black; border-radius: 5px; background: black; } ")
				  + QString( "QComboBox::drop-down:editable { background: black; border: black; } ")
				  + QString( "QFrame#flagFrame{ background-color: #808080; border: 1px solid #666666; border-radius: 2px; }"));

	Config & config = ConfigManager::getInstance().getCurrentConfig();

	_voxOxToolTipLineEdit = new VoxOxToolTipLineEdit(this);
	SAFE_CONNECT(_voxOxToolTipLineEdit, SIGNAL(keyPressedSignal(int)), SLOT(keyPressedSlot(int)));	
	
	//_voxOxToolTipLineEdit->setText(DEFAULT_CALLBAR_MESSAGE);
	_voxOxToolTipLineEdit->setToolTipDefaultText(DEFAULT_CALLBAR_MESSAGE);
	_ui->callBarComboBox->setLineEdit(_voxOxToolTipLineEdit);
	_voxOxToolTipLineEdit->displayToolTipMessage();
	repaint();

	_qtFlagsManager = new QtFlagsManager();
	_qtFlagsListWidget =  new QtFlagsListWidget();
	initFlagListWidget();

	SAFE_CONNECT(_qtFlagsListWidget, SIGNAL(currentFlagChanged(QString)), SLOT(currentFlagChangedSlot(QString)));

	SAFE_CONNECT(_ui->callBarComboBox, SIGNAL(editTextChanged(QString)), SLOT(comboBoxTextChangedSlot(QString)));
	SAFE_CONNECT(_ui->callBarComboBox, SIGNAL(activated(int)),			 SLOT(itemActivatedComboBoxSlot(int)));

	SAFE_CONNECT(_ui->flagLabel,     SIGNAL(clicked()), SLOT(flagClickedSlot()));//VOXOX CHANGE Rolando 03-24-09
	SAFE_CONNECT(_ui->flagDropLabel, SIGNAL(clicked()), SLOT(flagClickedSlot()));//VOXOX CHANGE Rolando 03-24-09
	SAFE_CONNECT(_ui->areaCodeLabel, SIGNAL(clicked()), SLOT(flagClickedSlot()));//VOXOX CHANGE Rolando 03-24-09

#ifdef OS_WINDOWS//VOXOX CHANGE by Rolando - 2009.07.13 
	_ui->callbarFrameLayout->setHorizontalSpacing (5);//VOXOX CHANGE by Rolando - 2009.07.13 
	_ui->callbarFrameLayout->setVerticalSpacing (0);//VOXOX CHANGE by Rolando - 2009.07.13 
	_ui->callbarFrameLayout->setContentsMargins( 1, 1, 2, 1 );//VOXOX CHANGE by Rolando - 2009.07.13 
	setMinimumHeight(23);//VOXOX CHANGE by Rolando - 2009.07.13 
	_ui->flagFrame->setMaximumSize(16777215,19);//VOXOX CHANGE by Rolando - 2009.07.13
	_ui->areaCodeLabel->setMinimumHeight(19);//VOXOX CHANGE by Rolando - 2009.07.13 
	_ui->areaCodeLabel->setMaximumHeight(19);//VOXOX CHANGE by Rolando - 2009.07.13 
#endif
}
Exemple #13
0
//VOXOX CHANGE by Rolando - 2009.10.23 
void QtContactNetworkMenu::buildContactMenuNetwork() 
{
	QtEnumIMProtocol::IMProtocol protocol = _cWengoPhone.getCUserProfileHandler().getCUserProfile()->getCContactList().getContactQtProtocol(_contactId);

	QAction * chatAction	  = new QAction(tr("Chat"),   this);
	QAction * socialWebAction = new QAction(tr("Social"), this);
	
	SAFE_CONNECT(chatAction,      SIGNAL(triggered()), SLOT(chatButtonClicked()));
	SAFE_CONNECT(socialWebAction, SIGNAL(triggered()), SLOT(webProfileContactClicked()));
	
	if(protocol == QtEnumIMProtocol::IMProtocolVoxOx)
	{
		QAction * callWithVideo =  new QAction(tr("Call with Video"), this);
		SAFE_CONNECT(callWithVideo, SIGNAL(triggered()), SLOT(callButtonClicked()));

		QAction * editContact =  new QAction(tr("Edit Contact"), this);
		SAFE_CONNECT(editContact, SIGNAL(triggered()), SLOT(profileContactClicked()));

		addAction(callWithVideo);
		addAction(editContact);

		return;
		
	}
	addAction(chatAction);

	if(protocol ==QtEnumIMProtocol::IMProtocolTwitter)
	{
		chatAction->setText(tr("Reply to"));
		socialWebAction->setText(tr("Twitter Profile"));
		addAction(socialWebAction);
	}
	else if(protocol ==QtEnumIMProtocol::IMProtocolFacebook)
	{
		socialWebAction->setText(tr("Facebook Profile"));
		addAction(socialWebAction);
	}
	else if(protocol ==QtEnumIMProtocol::IMProtocolMYSPACE)
	{
		socialWebAction->setText(tr("MySpace Profile"));
		addAction(socialWebAction);
	}
}
Exemple #14
0
void QtFileTransferWidget::addReceiveItem(ReceiveFileSession * fileSession) {

	QtFileTransferDownloadItem * fileTransferItem = new QtFileTransferDownloadItem(this, fileSession, _downloadFolder);
	SAFE_CONNECT(fileTransferItem, SIGNAL(removeClicked()), SLOT(itemRemoveClicked()));
	QListWidgetItem * item = new QListWidgetItem(/*_ui->downloadTransferListWidget*/);
	item->setSizeHint(fileTransferItem->minimumSizeHint());
	_ui->downloadTransferListWidget->insertItem(0, item);
	_ui->downloadTransferListWidget->setItemWidget(item, fileTransferItem);
	showDownloadTab();
	showAndRaise();
}
Exemple #15
0
QtSystray::QtSystray(QObject * parent)
	: QObjectThreadSafe(NULL) {

//	_qtWengoPhone = (QtWengoPhone *) parent;	//VOXOX - JRT - 2009.04.15 
	_qtWengoPhone = dynamic_cast<QtWengoPhone*>(parent);
	_qtToolBar = dynamic_cast<QtToolBar*>(_qtWengoPhone->getQtToolBar());

	_recentContacts = NULL;
	_startNew = NULL;

	//Check Internet connection status
	NetworkObserver::getInstance().connectionIsDownEvent +=
		boost::bind(&QtSystray::connectionIsDownEventHandler, this);

	NetworkObserver::getInstance().connectionIsUpEvent +=
		boost::bind(&QtSystray::connectionIsUpEventHandler, this);

	//trayMenu
	_trayMenu = new QMenu(_qtWengoPhone->getWidget());
	SAFE_CONNECT(_trayMenu, SIGNAL(aboutToShow()), SLOT(setTrayMenu()));

	//trayIcon
	_trayIcon = new TrayIcon(QPixmap(":pics/systray/voxox.png"), tr("VoxOx"), _trayMenu, _qtWengoPhone->getWidget());

#if defined(OS_LINUX)
	// On Linux, the main window is shown using only one click
	SAFE_CONNECT(_trayIcon, SIGNAL(clicked( const QPoint&, int)), SLOT(toggleMainWindow()));
#else
	SAFE_CONNECT(_trayIcon, SIGNAL(doubleClicked(const QPoint &)), SLOT(toggleMainWindow()));
#endif
	phoneLineStateChanged(EnumPhoneLineState::PhoneLineStateProgress);
	_trayIcon->show();

	//systray re-initialization
	SAFE_CONNECT(_qtWengoPhone, SIGNAL(userProfileDeleted()), SLOT(userProfileDeleted()));

	setTrayMenu();

	LANGUAGE_CHANGE(_trayIcon);
}
Exemple #16
0
void QtFileTransferWidget::addSendItem(SendFileSession * fileSession,
	const std::string & filename, const std::string & contact) {

	QtFileTransferUploadItem * fileTransferItem = new QtFileTransferUploadItem(this, fileSession,
		QString::fromStdString(filename), contact);
	SAFE_CONNECT(fileTransferItem, SIGNAL(removeClicked()), SLOT(itemRemoveClicked()));
	QListWidgetItem * item = new QListWidgetItem(/*_ui->uploadTransferListWidget*/);
	item->setSizeHint(fileTransferItem->minimumSizeHint());
	_ui->uploadTransferListWidget->insertItem(0, item);
	_ui->uploadTransferListWidget->setItemWidget(item, fileTransferItem);
	showUploadTab();
	showAndRaise();
}
Exemple #17
0
void QtVoxWindowManager::showWizardWindow(){
	if(!checkIfExist(QtEnumWindowType::WizardWindow)){
		QtWizardDialog * wizard = new QtWizardDialog(getDefaultParent(), _qtWengoPhone.getCWengoPhone());
		SAFE_CONNECT(wizard, SIGNAL(windowClose(QString )), SLOT(closeWindow(QString )));
		wizard->showWindow();	
		_activeWindowList[wizard->getKey()] = wizard;
	}else{
		QString id = QtEnumWindowType::toString(QtEnumWindowType::WizardWindow);
		QtVoxWindowInfo * info = getWindow(id);
		if(info!=NULL){
			info->showWindow();
		}
	}
}
Exemple #18
0
QtHistory::QtHistory(CHistory & cHistory)
	: QAbstractTableModel(NULL),
	_cHistory(cHistory) {

	_chatLogViewer = NULL;
	_mutex = new QMutex(QMutex::Recursive);

	_stateFilter = HistoryMemento::Any;

	QtWengoPhone * qtWengoPhone = (QtWengoPhone *) _cHistory.getCWengoPhone().getPresentation();
	_historyWidget = new QtHistoryWidget(qtWengoPhone->getWidget(), this);
	SAFE_CONNECT(_historyWidget,
		SIGNAL(replayItemRequested(int)),
		SLOT(replayItem(int))
	);
	SAFE_CONNECT(_historyWidget,
		SIGNAL(showChatLogRequested(int)),
		SLOT(showChatLog(int))
	);
	SAFE_CONNECT(_historyWidget,
		SIGNAL(removeItemRequested(int)),
		SLOT(removeItem(int))
	);
	SAFE_CONNECT(_historyWidget,
		SIGNAL(missedCallsSeen()),
		SLOT(resetUnseenMissedCalls())
	);

	SAFE_CONNECT(_historyWidget,
		SIGNAL(showOnlyItemOfType(int)),
		SLOT(showOnlyItemOfTypeSlot(int))
	);
	qtWengoPhone->setQtHistoryWidget(_historyWidget);
	
	// define user use a Wengo or a SIP account
	UserProfile * userProfile = _cHistory.getCWengoPhone().getCUserProfileHandler().getUserProfileHandler().getCurrentUserProfile();
	if (userProfile) {
		_isWengoAccountConnected = userProfile->hasWengoAccount();
	} else {
		_isWengoAccountConnected = false;
	}
	////

	updatePresentation();
}
Exemple #19
0
void QtVoxWindowManager::showConfigWindow(QString pageName){
	if(!checkIfExist(QtEnumWindowType::ConfigWindow)){
		QtWengoConfigDialog * settings = new QtWengoConfigDialog(getDefaultParent(), _qtWengoPhone.getCWengoPhone());
		SAFE_CONNECT(settings, SIGNAL(windowClose(QString )), SLOT(closeWindow(QString )));
		if(pageName!=""){
			settings->setCurrentTab(pageName);
		}
		settings->showWindow();	
		_activeWindowList[settings->getKey()] = settings;
	}else{
		QString id = QtEnumWindowType::toString(QtEnumWindowType::ConfigWindow);
		QtVoxWindowInfo * info = getWindow(id);
		if(info!=NULL){
			info->setCurrentTab(pageName);
			info->showWindow();
		}

	}
}
Exemple #20
0
void QtToaster::show() {
	//10 pixels of margin
#if !defined(OS_WINDOWS)
	static const int MARGIN_X = 30;
#else
	static const int MARGIN_X = 10;
#endif

	QDesktopWidget * desktop = QApplication::desktop();
	QRect screenGeometry = desktop->screenGeometry(desktop->primaryScreen());

	_toaster->move(screenGeometry.right() - _toaster->size().width() - MARGIN_X, screenGeometry.bottom());

	_toaster->show();

	_timer = new QTimer(this);
	SAFE_CONNECT(_timer, SIGNAL(timeout()), SLOT(changeToasterPosition()));
	_timer->start(TIME_TO_SHOW);
}
Exemple #21
0
void QtVoxWindowManager::showProfileWindow(){
	if(!checkIfExist(QtEnumWindowType::ProfileWindow)){
		if (_qtWengoPhone.getCWengoPhone().getCUserProfileHandler().getCUserProfile()){
			QtProfileDetails * qtProfileDetails   = new QtProfileDetails(*_qtWengoPhone.getCWengoPhone().getCUserProfileHandler().getCUserProfile(),
				_qtWengoPhone.getCWengoPhone().getCUserProfileHandler().getCUserProfile()->getUserProfile(),
				getDefaultParent(), tr("Edit My Profile"));

			SAFE_CONNECT(qtProfileDetails, SIGNAL(windowClose(QString )), SLOT(closeWindow(QString )));
			qtProfileDetails->showWindow();	
			_activeWindowList[qtProfileDetails->getKey()] = qtProfileDetails;
		}
	}else{
		QString id = QtEnumWindowType::toString(QtEnumWindowType::ProfileWindow);
		QtVoxWindowInfo * info = getWindow(id);
		if(info!=NULL){
			info->showWindow();
		}
	}
}
Exemple #22
0
//VOXOX CHANGE by Rolando 2009.05.05
QtVoxOxLoginMessage::QtVoxOxLoginMessage(QWidget* parent, QtWengoPhone * qtWengoPhone, CUserProfileHandler & cUserProfileHandler)
	: QWidget(NULL),
	_cUserProfileHandler(cUserProfileHandler),
	_qtWengoPhone(qtWengoPhone)
	{

	_qtWengoPhone = qtWengoPhone;

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

	_profileName = "";

	_ui->tryAgainButton->setDefault(true);
	
	LANGUAGE_CHANGE(this);
		
	SAFE_CONNECT(_ui->tryAgainButton, SIGNAL(clicked()), SLOT(tryAgainButtonClicked()));

}
Exemple #23
0
QtChatHistoryWidget::QtChatHistoryWidget(QWidget * parent) : QWebView(parent) {
	//setLineWrapMode(QTextEdit::WidgetWidth);

	
	Config & config = ConfigManager::getInstance().getCurrentConfig();
	String themeDir = config.getChatTheme();
	String variant = config.getChatThemeVariant();
	variant.decodeFromXMLSpecialCharacters();

	_theme = new QtChatTheme(this);
	setTheme(QString::fromUtf8(themeDir.c_str()),QString::fromUtf8(variant.c_str()));


	//VOXOX - CJC - 2009.05.06 Force Keyboard copyng
	_copy = new QShortcut(QKeySequence::Copy,this);
	SAFE_CONNECT(_copy, SIGNAL(activated()), SLOT(copySlot()));

	page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAsNeeded);
	page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAsNeeded);

	page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);

	SAFE_CONNECT(this, SIGNAL(linkClicked(const QUrl &)), SLOT(urlClicked(const QUrl &)));
	
	//QWebSettings *defaultSettings = QWebSettings::globalSettings();
	//
	////Add support for flash and other pluggins
	//defaultSettings->setAttribute(QWebSettings::PluginsEnabled, true);
	//defaultSettings->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
	//defaultSettings->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, false);
	//defaultSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, false);
	//defaultSettings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, false);
	//
	//
	////Add support for flash and other pluggins
	//defaultSettings->setObjectCacheCapacities(1024,0,1024);
	//defaultSettings->clearIconDatabase(); 
	

	//clear();
}
Exemple #24
0
//VOXOX CHANGE by Rolando 04-06-09
QtAddVoxOxAccount::QtAddVoxOxAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler)
	:ILogin(qtLoginDialog, cUserProfileHandler){

	_ui = new Ui::AddVoxOxAccount();
	_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->linkToSignUpLabel, SIGNAL(linkActivated(const QString &)), SLOT(linkToSignUpLabelClicked()));
	//SAFE_CONNECT(_ui->helpLabel, SIGNAL(linkActivated(const QString &)), SLOT(helpButtonClicked()));
	SAFE_CONNECT(_ui->linkForgotPasswordLabel, SIGNAL(linkActivated(const QString &)), SLOT(linkForgotPasswordLabelClicked()));
	SAFE_CONNECT(_ui->publicComputerCheckBox, SIGNAL(stateChanged(int)), SLOT(publicComputerStateChanged(int)));
	SAFE_CONNECT(_ui->rememberPasswordCheckBox, SIGNAL(stateChanged(int)), SLOT(rememberPasswordStateChanged(int)));
	SAFE_CONNECT(_ui->usernameComboBox, SIGNAL(activated(int)), SLOT(itemActivatedComboBoxSlot(int)));

	
	resize(QSize(279,380));
}
Exemple #25
0
void QtSoftUpdatePrompt::display( const SoftUpdateInfo& suInfo )
{
    _refreshTimerId = 0;

    //Set prompt.
    QString labelText = "";
    QString imagePath = ":pics/auto_updater_recommended.png";

    //Determine text.
    if ( suInfo.getDescription() == "" )
    {
        if ( suInfo.isMandatory() )
        {
            labelText = s_defMandatory;
        }
        else if ( suInfo.isRecommended() )
        {
            labelText = s_defRecommended;
        }
        else
        {
            assert(false);		//New option?
            labelText = s_defRecommended;
        }
    }
    else
    {
        labelText = suInfo.getDescription().c_str();
    }

    //Determine Image
    if ( suInfo.isMandatory() )
    {
        imagePath = ":pics/auto_updater_mandatory.png";
    }
    else if ( suInfo.isRecommended() )
    {
        imagePath = ":pics/auto_updater_recommended.png";
    }
    else
    {
        assert(false);		//New option?
        imagePath = ":pics/auto_updater_recommended.png";
    }

    //Update UI.
    QString labelText2 = labelText.arg( suInfo.getVersion().c_str() );

    _ui->lblPrompt->setText(labelText2);
    _ui->lblIcon->setPixmap( QPixmap(imagePath) );

    //Hide checkbox as needed.
    if ( suInfo.isMandatory() )
    {
        _ui->checkBox->setEnabled( false );
        _ui->checkBox->hide();
    }

    //Hide download text and progress bar until user clicks Install Now.
    _ui->lblDownloading->hide();
    _ui->progressBar->hide();

    SAFE_CONNECT(_ui->installButton, SIGNAL(clicked()), SLOT(handleInstall()) );
    SAFE_CONNECT(_ui->cancelButton,  SIGNAL(clicked()), SLOT(handleCancel() ) );

    //Modal for mandatory, modeless for recommended.
    if ( suInfo.isMandatory() )
    {
        exec();
    }
    else
    {
        show();
    }
}