diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
commit | a2277b6bc715464e83882b90c2a058139b8a6b54 (patch) | |
tree | ab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /charselectapplet/charselectapplet.cpp | |
parent | d3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff) | |
download | tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip |
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'charselectapplet/charselectapplet.cpp')
-rw-r--r-- | charselectapplet/charselectapplet.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/charselectapplet/charselectapplet.cpp b/charselectapplet/charselectapplet.cpp index 24cc55a..1ccfaf8 100644 --- a/charselectapplet/charselectapplet.cpp +++ b/charselectapplet/charselectapplet.cpp @@ -41,12 +41,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *tqparent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("kcharselectapplet"); return new CharSelectApplet(configFile, KPanelApplet::Normal, KPanelApplet::About | KPanelApplet::Preferences, - parent, "kcharselectapplet"); + tqparent, "kcharselectapplet"); } } @@ -55,8 +55,8 @@ static int cell_height = 16; static int char_count = 0; CharSelectApplet::CharSelectApplet(const TQString& configFile, Type type, int actions, - TQWidget *parent, const char *name) - : KPanelApplet(configFile, type, actions, parent, name), + TQWidget *tqparent, const char *name) + : KPanelApplet(configFile, type, actions, tqparent, name), _aboutData(0), _configDialog(0) { // read configuration @@ -64,9 +64,9 @@ CharSelectApplet::CharSelectApplet(const TQString& configFile, Type type, int ac c->setGroup("General"); cell_width = c->readNumEntry("CellWidth", cell_width); cell_height = c->readNumEntry("CellHeight", cell_height); - TQString characters = c->readEntry("Characters", "ÄäÖöÜüß©®§"); + TQString characters = c->readEntry("Characters", "������ߩ��"); - // setup layout + // setup tqlayout TQHBoxLayout *_layout = new TQHBoxLayout(this); _layout->setAutoAdd(true); @@ -151,13 +151,13 @@ void CharSelectApplet::about() dialog.exec(); } -CharTable::CharTable(TQWidget* parent, const char* name) - : TQFrame(parent, name), _rows(2), _cols(2), +CharTable::CharTable(TQWidget* tqparent, const char* name) + : TQFrame(tqparent, name), _rows(2), _cols(2), _activeRow(-1), _activeCol(-1), _cWidth(cell_width), _cHeight(cell_height) { setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); - setFocusPolicy(TQWidget::NoFocus); + setFocusPolicy(TQ_NoFocus); setBackgroundMode(TQWidget::NoBackground); } @@ -228,7 +228,7 @@ void CharTable::paintEvent(TQPaintEvent* e) TQFrame::paintEvent(e); } -void CharTable::repaintCell(int r, int c) +void CharTable::tqrepaintCell(int r, int c) { TQPainter p(this); @@ -251,16 +251,16 @@ void CharTable::paintCell(TQPainter* p, int row, int col) // draw background if (active) { - p->setBrush(TQBrush(colorGroup().highlight())); + p->setBrush(TQBrush(tqcolorGroup().highlight())); p->setPen(NoPen); p->drawRect(0, 0, w, h); - p->setPen(colorGroup().highlightedText()); + p->setPen(tqcolorGroup().highlightedText()); } else { - p->setBrush(TQBrush(colorGroup().base())); + p->setBrush(TQBrush(tqcolorGroup().base())); p->setPen(NoPen); p->drawRect(0, 0, w, h); - p->setPen(colorGroup().text()); + p->setPen(tqcolorGroup().text()); } // set font @@ -285,7 +285,7 @@ void CharTable::mousePressEvent(TQMouseEvent *e) void CharTable::mouseMoveEvent(TQMouseEvent *e) { - if(!(e->state() & (LeftButton | RightButton | MidButton))) return; + if(!(e->state() & (Qt::LeftButton | Qt::RightButton | Qt::MidButton))) return; int row = findRow(e->y()); if (row == -1) return; @@ -307,10 +307,10 @@ void CharTable::selectCell(int row, int col) _activeRow = row; _activeCol = col; - repaintCell(oldRow, oldCol); - repaintCell(_activeRow, _activeCol); + tqrepaintCell(oldRow, oldCol); + tqrepaintCell(_activeRow, _activeCol); - QClipboard *cb = TQApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); TQObject::disconnect( cb, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clearCell()) ); TQString text = TQString(_map[col + row * _cols]); bool oldMode = cb->selectionModeEnabled(); @@ -330,14 +330,14 @@ void CharTable::clearCell() _activeRow = -1; _activeCol = -1; - repaintCell(oldRow, oldCol); + tqrepaintCell(oldRow, oldCol); - TQObject::disconnect( TQApplication::clipboard(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clearCell()) ); + TQObject::disconnect( TQApplication::tqclipboard(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clearCell()) ); } -ConfigDialog::ConfigDialog(TQWidget* parent, const char* name) - : KDialogBase(parent, name, true, i18n("Configuration"), +ConfigDialog::ConfigDialog(TQWidget* tqparent, const char* name) + : KDialogBase(tqparent, name, true, i18n("Configuration"), Ok | Cancel, Ok, true) { TQVBox *page = makeVBoxMainWidget(); |