Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from zlice/ctrlArrow
Browse files Browse the repository at this point in the history
Ctrl arrow to move words & misc fixes
  • Loading branch information
BGmot committed Sep 17, 2014
2 parents f2b833c + 55daa5d commit 308e3cb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
1 change: 0 additions & 1 deletion bar-descriptor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,4 @@
<permission>access_shared</permission>
<permission>run_when_backgrounded</permission>
<env var="LD_LIBRARY_PATH" value="app/native/lib:/usr/lib/qt4/lib"/>
<env var="PATH" value="app/native" />
</qnx>
2 changes: 1 addition & 1 deletion mymainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <QtCore/QSettings>
#include <QtCore/QFile>
#include <QtGui/QMessageBox>
#include <qtCore/Qdir>
#include <QtCore/QDir>
#include <bps/netstatus.h>
#include <qplatformnativeinterface_qpa.h>
#include <qapplication.h>
Expand Down
2 changes: 1 addition & 1 deletion mymainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
#ifndef MYMAINWINDOW_H
#define MYMAINWINDOW_H
#include <QtGui/QMainwindow>
#include <QtGui/QMainWindow>
#include <bb/platform/PaymentManager>

class CMyMainWindow : public QMainWindow
Expand Down
26 changes: 15 additions & 11 deletions mymenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ QWidget(parent)

// There is nothing to comment here, all button names tell you what they do
int CMyMenu::MenuInit(){
btnCtrlC = new QToolButton(this);
btnCtrlC = new QToolButton(this);
btnCtrlC->setObjectName(QString::fromUtf8("btnCtrlC"));
btnCtrlC->setText(QString("Ctrl+"));

btnTab = new QToolButton(this);
btnTab = new QToolButton(this);
btnTab->setObjectName(QString::fromUtf8("btnTab"));
btnTab->setText(QString("Tab"));

Expand Down Expand Up @@ -82,7 +82,7 @@ void CMyMenu::SetGeometryPortrait(){
#endif
}
void CMyMenu::SetGeometryLandscape(){
this->setGeometry(1206, 0, 73, 357);
this->setGeometry(1206, 0, 73, 357);
btnCtrlC->setGeometry(QRect(1, 1, 71, 51));
btnTab->setGeometry(QRect(1, 52, 71, 51));
btnLeft->setGeometry(QRect(1, 103, 71, 51));
Expand Down Expand Up @@ -112,16 +112,20 @@ void CMyMenu::on_btnTab_clicked(){
return;
}
void CMyMenu::on_btnLeft_clicked(){
char c[] = {0x1B,0x5B,'D'};
write(masterFdG, c, 3);
console->setFocus();
return;
char c[] = {0x1B,0x5B,'D'};
if(bCtrlFlag)
c[2] = 'd';
write(masterFdG, c, 3);
console->setFocus();
return;
}
void CMyMenu::on_btnRight_clicked(){
char c[] = {0x1B,0x5B,'C'};
write(masterFdG, c, 3);
console->setFocus();
return;
char c[] = {0x1B,0x5B,'C'};
if(bCtrlFlag)
c[2] = 'c';
write(masterFdG, c, 3);
console->setFocus();
return;
}
void CMyMenu::on_btnUp_clicked(){
char c[] = {0x1B,0x5B,'A'};
Expand Down

0 comments on commit 308e3cb

Please sign in to comment.