summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/function_keyboard.cpp12
-rw-r--r--noncore/apps/opie-console/function_keyboard.h5
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp7
3 files changed, 12 insertions, 12 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp
index 977a384..c314949 100644
--- a/noncore/apps/opie-console/function_keyboard.cpp
+++ b/noncore/apps/opie-console/function_keyboard.cpp
@@ -110,17 +110,17 @@ void FunctionKeyboard::paintKey(int row, int col) {
keyWidth, keyHeight,
Qt::AlignHCenter | Qt::AlignVCenter,
keys["r" + QString::number(row) + "c" + QString::number(col)].getL()
);
if (row == numRows) {
// sometimes it doesnt draw the last line
- p.drawLine((col+1) * keyWidth -2, row * keyHeight,
+ p.drawLine((col+1) * keyWidth -2, row * keyHeight,
(col+1) * keyWidth -2, (row + 1) * keyHeight
);
}
}
void FunctionKeyboard::mousePressEvent(QMouseEvent *e) {
@@ -183,18 +183,18 @@ void FunctionKeyboard::loadDefaults() {
keys.insert( "r1c8", FKey ("End", 4113, 0));
keys.insert( "r1c9", FKey ("PU", 4118, 0));
keys.insert( "r1c10", FKey ("PD", 4119, 0));
}
/* FunctionKeyboardConfig {{{1 */
-FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent) :
- ProfileDialogKeyWidget(name, parent) {
+FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* parent, const char* na )
+ : ProfileDialogKeyWidget(name, parent, na) {
kb = new FunctionKeyboard(this);
QGroupBox *dimentions = new QGroupBox(2, Qt::Horizontal, tr("Dimentions"), this);
QLabel *l = new QLabel("Rows", dimentions);
QSpinBox *m_rowBox = new QSpinBox(1, 15, 1, dimentions);
connect (m_rowBox, SIGNAL(valueChanged(int)), this, SLOT(slotChangeRows(int)));
@@ -221,22 +221,22 @@ FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* par
root->addWidget(kb);
root->addWidget(dimentions);
root->addWidget(editKey);
}
FunctionKeyboardConfig::~FunctionKeyboardConfig() {
}
void FunctionKeyboardConfig::load (const Profile& prof) {
- int i = prof.readNumEntry("keb_rows", 1);
- //m_rowBox->setValue(i);
+ //int i = prof.readNumEntry("keb_rows", 1);
+ m_rowBox->setValue( 2 );
}
void FunctionKeyboardConfig::save (Profile& prof) {
- //prof.writeEntry("keb_rows", m_rowBox->value());
+ prof.writeEntry("keb_rows", m_rowBox->value());
}
void FunctionKeyboardConfig::slotChangeRows(int r) {
kb->changeRows(r);
// have to do this so the whole thing gets redrawn
kb->hide(); kb->show();
diff --git a/noncore/apps/opie-console/function_keyboard.h b/noncore/apps/opie-console/function_keyboard.h
index efeff6d..05b991d 100644
--- a/noncore/apps/opie-console/function_keyboard.h
+++ b/noncore/apps/opie-console/function_keyboard.h
@@ -58,30 +58,33 @@ private:
private:
// thie key for the map is the row/col
QMap<QString, FKey> keys;
uint numRows;
+ int test;
uint numCols;
uint keyHeight;
double keyWidth; // decimal point matters!
int pressedRow, pressedCol;
QObject *parent;
};
class FunctionKeyboardConfig : public ProfileDialogKeyWidget {
+
Q_OBJECT
+
public:
- FunctionKeyboardConfig(const QString& name, QWidget *wid);
+ FunctionKeyboardConfig(const QString& name, QWidget *wid, const char* name = 0l );
~FunctionKeyboardConfig();
void load(const Profile&);
void save(Profile&);
private slots:
void slotKeyPressed(ushort, ushort, bool, bool, bool, ushort, ushort);
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 30dd21c..c1020fa 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -492,21 +492,18 @@ void MainWindow::slotSessionChanged( Session* ses ) {
}
}
void MainWindow::slotFullscreen() {
if ( m_isFullscreen ) {
- ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), false );
- ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken );
-
- setCentralWidget( m_consoleWindow );
- ( m_curSession->widgetStack() )->show();
+ ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true );
+ ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() );
( m_curSession->emulationHandler() )->cornerButton()->hide();
disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
} else {
savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget();
( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame );
( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop
, QPoint(0,0), false );