Applied,
Thank you very much
Vadim
Rene Kolarik wrote:
> # HG changeset patch
> # User Rene Kolarik
> # Date 1240266250 -7200
> # Node ID 515d8d69fd31c46789600dbc53f57f075d190514
> # Parent 75d94a9fcf98c3597c60ced00934889413c5faa5
> Dialing with keyboard
>
> diff -r 75d94a9fcf98 -r 515d8d69fd31
> wengophone/src/presentation/qt/QtDialpad.cpp
> --- a/wengophone/src/presentation/qt/QtDialpad.cpp Wed Apr 15 12:39:55
> 2009 +0200
> +++ b/wengophone/src/presentation/qt/QtDialpad.cpp Tue Apr 21 00:24:10
> 2009 +0200
> @@ -91,6 +91,7 @@
> SAFE_CONNECT(_ui->qtSVGDialpad, SIGNAL(keyPoundSelected()),
> SLOT(poundButtonClicked()));
>
> setThemeMode(ThemeModeAll);
> + setFocusPolicy(Qt::StrongFocus);
> }
>
> QtDialpad::~QtDialpad() {
> @@ -252,3 +253,54 @@
> }
> setCurrentTheme(_ui->audioSmileysComboBox->itemText(0));
> }
> +
> +void QtDialpad::keyPressEvent(QKeyEvent * event)
> +{
> + switch( event->key() )
> + {
> + case Qt::Key_0:
> + playTone("0");
> + break;
> + case Qt::Key_1:
> + playTone("1");
> + break;
> + case Qt::Key_2:
> + playTone("2");
> + break;
> + case Qt::Key_3:
> + playTone("3");
> + break;
> + case Qt::Key_4:
> + playTone("4");
> + break;
> + case Qt::Key_5:
> + playTone("5");
> + break;
> + case Qt::Key_6:
> + playTone("6");
> + break;
> + case Qt::Key_7:
> + playTone("7");
> + break;
> + case Qt::Key_8:
> + playTone("8");
> + break;
> + case Qt::Key_9:
> + playTone("9");
> + break;
> + case Qt::Key_Asterisk:
> + playTone("*");
> + break;
> + case Qt::Key_Plus:
> + playTone("#");
> + break;
> + case Qt::Key_Backspace:
> + _qtWengoPhone->dialpadBackspace();
> + break;
> + case Qt::Key_Enter:
> + case Qt::Key_Return:
> + _qtWengoPhone->dialpadEnter();
> + default:
> + QWidget::keyPressEvent(event);
> + }
> +}
> diff -r 75d94a9fcf98 -r 515d8d69fd31
> wengophone/src/presentation/qt/QtDialpad.h
> --- a/wengophone/src/presentation/qt/QtDialpad.h Wed Apr 15 12:39:55
> 2009 +0200
> +++ b/wengophone/src/presentation/qt/QtDialpad.h Tue Apr 21 00:24:10
> 2009 +0200
> @@ -97,6 +97,9 @@
> UpQComboBox * _audioSmileysComboBox;
>
> ThemeMode _themeMode;
> +
> +protected:
> + void keyPressEvent(QKeyEvent * event);
> };
>
> #endif //OWQTDIALPAD_H
> diff -r 75d94a9fcf98 -r 515d8d69fd31
> wengophone/src/presentation/qt/QtWengoPhone.cpp
> --- a/wengophone/src/presentation/qt/QtWengoPhone.cpp Wed Apr 15 12:39:55
> 2009 +0200
> +++ b/wengophone/src/presentation/qt/QtWengoPhone.cpp Tue Apr 21 00:24:10
> 2009 +0200
> @@ -626,6 +626,23 @@
> }
> }
>
> +void QtWengoPhone::dialpadBackspace() {
> + int s;
> + if (_cWengoPhone.getCUserProfileHandler().getCUserProfile()) {
> + s = _ui->callBar->getPhoneComboBoxCurrentText().size();
> + if(s>0)
> + {
> + std::string str = _ui->callBar->getPhoneComboBoxCurrentText();
> + str.resize(s-1);
> + _ui->callBar->setPhoneComboBoxEditText(str);
> + }
> + }
> +}
> +
> +void QtWengoPhone::dialpadEnter() {
> + callButtonClicked();
> +}
> +
> void QtWengoPhone::prepareToExitApplication() {
> Config & config = ConfigManager::getInstance().getCurrentConfig();
>
> @@ -885,4 +902,4 @@
> void QtWengoPhone::setCurrentUserProfileEventHandlerSlot()
> {
> _qtToolBar->tryingToConnect();
> -}
> \ No newline at end of file
> +}
> diff -r 75d94a9fcf98 -r 515d8d69fd31
> wengophone/src/presentation/qt/QtWengoPhone.h
> --- a/wengophone/src/presentation/qt/QtWengoPhone.h Wed Apr 15 12:39:55
> 2009 +0200
> +++ b/wengophone/src/presentation/qt/QtWengoPhone.h Tue Apr 21 00:24:10
> 2009 +0200
> @@ -95,6 +95,10 @@
>
> void dialpad(const std::string & tone);
>
> + void dialpadBackspace();
> +
> + void dialpadEnter();
> +
> void connectionStatusEventHandler(int totalSteps, int currentStep,
> const std::string & infoMsg);
>
> QWidget * getWidget() const;
> _______________________________________________
> QuteCom-dev mailing list
> [email protected]
> http://lists.qutecom.org/mailman/listinfo/qutecom-dev
>
>
>
_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev