Diffstat (limited to 'inputmethods/multikey/keyboard.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index e3d3928..3f6f73b 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp @@ -179,3 +179,3 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col) - QPixmap *pix = keys->pix(row,col); + QImage *pix = keys->pix(row,col); @@ -197,3 +197,3 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col) // center the image in the middle of the key - p.drawPixmap( x + (defaultKeyWidth * keyWidth - pix->width())/2, + p.drawImage( x + (defaultKeyWidth * keyWidth - pix->width())/2, y + (keyHeight - pix->height())/2 + 1, @@ -221,3 +221,3 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col) - QPixmap *pix = keys->pix(row, col); + QImage *pix = keys->pix(row, col); int keyWidth = keys->width(row, col); @@ -246,5 +246,6 @@ void Keyboard::drawKeyboard(QPainter &p, int row, int col) // center the image in the middle of the key - p.drawPixmap( x + (keyWidthPix - pix->width())/2, + pix->setColor(1, textcolor.rgb()); + p.drawImage( x + (keyWidthPix - pix->width())/2, y + (keyHeight - pix->height())/2 + 1, - QPixmap(*pix) ); + QImage(*pix) ); } @@ -1046,3 +1047,3 @@ void Keys::setKeysFromFile(const char * filename) { char * xpm[256]; //couldnt be larger than that... could it? - QPixmap *xpm2pix = 0; + QImage *xpm2pix = 0; @@ -1092,3 +1093,3 @@ void Keys::setKeysFromFile(const char * filename) { - xpm2pix = new QPixmap((const char **)xpm); + xpm2pix = new QImage((const char **)xpm); for (int i = 0; i < xpmLineCount; i++) @@ -1161,3 +1162,3 @@ void Keys::setKeysFromFile(const char * filename) { void Keys::setKey(const int row, const int qcode, const ushort unicode, - const int width, QPixmap *pix) { + const int width, QImage *pix) { @@ -1218,3 +1219,3 @@ int Keys::qcode(const int row, const int col) { -QPixmap *Keys::pix(const int row, const int col) { +QImage *Keys::pix(const int row, const int col) { |