summaryrefslogtreecommitdiffstats
path: root/src/progs/gui/prog_config_center.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/progs/gui/prog_config_center.cpp
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/progs/gui/prog_config_center.cpp')
-rw-r--r--src/progs/gui/prog_config_center.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/progs/gui/prog_config_center.cpp b/src/progs/gui/prog_config_center.cpp
index 3210921..f781280 100644
--- a/src/progs/gui/prog_config_center.cpp
+++ b/src/progs/gui/prog_config_center.cpp
@@ -8,13 +8,13 @@
***************************************************************************/
#include "prog_config_center.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwidgetstack.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qtabwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwidgetstack.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqtabwidget.h>
#include <kiconloader.h>
#include "progs/list/prog_list.h"
@@ -25,7 +25,7 @@
#include "libgui/main_global.h"
//----------------------------------------------------------------------------
-QPixmap Programmer::OptionsConfigWidget::pixmap() const
+TQPixmap Programmer::OptionsConfigWidget::pixmap() const
{
KIconLoader loader;
return loader.loadIcon("piklab_config_programmer", KIcon::Toolbar, KIcon::SizeMedium);
@@ -37,15 +37,15 @@ Programmer::SelectConfigWidget::SelectConfigWidget()
uint row = 0;
// programmer type
- QLabel *label = new QLabel(i18n("Programmer in use:"), this);
+ TQLabel *label = new TQLabel(i18n("Programmer in use:"), this);
addWidget(label, row,row, 0,0);
- _combo = new KeyComboBox<QString>(this);
- connect(_combo->widget(), SIGNAL(activated(int)), SLOT(programmerChanged()));
+ _combo = new KeyComboBox<TQString>(this);
+ connect(_combo->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(programmerChanged()));
addWidget(_combo->widget(), row,row, 1,1);
row++;
// tab widget
- _tabWidget = new QTabWidget(this);
+ _tabWidget = new TQTabWidget(this);
addWidget(_tabWidget, row,row, 0,2);
row++;
@@ -53,14 +53,14 @@ Programmer::SelectConfigWidget::SelectConfigWidget()
_portSelectorContainer = new Container;
_portSelectorContainer->setMargin(10);
_portSelector = new PortSelector(_portSelectorContainer);
- connect(_portSelector, SIGNAL(changed()), SLOT(portChanged()));
+ connect(_portSelector, TQT_SIGNAL(changed()), TQT_SLOT(portChanged()));
_portSelectorContainer->addWidget(_portSelector, 0,0, 0,0);
// specific programmer config
- _stack = new KeyWidgetStack<QString>(_tabWidget);
- static_cast<QFrame *>(_stack->widget())->setMargin(10);
+ _stack = new KeyWidgetStack<TQString>(_tabWidget);
+ static_cast<TQFrame *>(_stack->widget())->setMargin(10);
KIconLoader loader;
- QPixmap icon = loader.loadIcon("configure", KIcon::Small);
+ TQPixmap icon = loader.loadIcon("configure", KIcon::Small);
_tabWidget->addTab(_stack->widget(), icon, i18n("Specific"));
::Programmer::Lister::ConstIterator it;
for (it=::Programmer::lister().begin(); it!=::Programmer::lister().end(); ++it) {
@@ -73,23 +73,23 @@ Programmer::SelectConfigWidget::SelectConfigWidget()
// init
_combo->setCurrentItem(GlobalConfig::programmerGroup().name());
_stack->setCurrentItem(GlobalConfig::programmerGroup().name());
- QTimer::singleShot(0, this, SLOT(programmerChanged()));
+ TQTimer::singleShot(0, this, TQT_SLOT(programmerChanged()));
}
void Programmer::SelectConfigWidget::portChanged()
{
- ::BusyCursor bc; // can take a few seconds to connect programmer...
+ ::PBusyCursor bc; // can take a few seconds to connect programmer...
HardwareDescription hd;
hd.port = _portSelector->portDescription();
::Hardware::Config *config = Main::programmerGroup().hardwareConfig();
if (config) hd.name = config->currentHardware(hd.port.type);
delete config;
- QWidget *w = _stack->item(_combo->currentItem());
+ TQWidget *w = _stack->item(_combo->currentItem());
bool ok = static_cast< ::Programmer::ConfigWidget *>(w)->setPort(hd);
- _portSelector->setStatus(hd.port.type, ok ? i18n("Connection: Ok") : i18n("Connection: Error"));
+ _portSelector->settqStatus(hd.port.type, ok ? i18n("Connection: Ok") : i18n("Connection: Error"));
}
-QPixmap Programmer::SelectConfigWidget::pixmap() const
+TQPixmap Programmer::SelectConfigWidget::pixmap() const
{
KIconLoader loader;
return loader.loadIcon("piklab_config_programmer", KIcon::Toolbar, KIcon::SizeMedium);
@@ -98,25 +98,25 @@ QPixmap Programmer::SelectConfigWidget::pixmap() const
void Programmer::SelectConfigWidget::saveConfig()
{
_portSelector->saveConfig();
- QString key = _combo->currentItem();
+ TQString key = _combo->currentItem();
static_cast<ConfigWidget *>(_stack->item(key))->saveConfig();
GlobalConfig::writeProgrammerGroup(*::Programmer::lister().group(key));
}
void Programmer::SelectConfigWidget::programmerChanged()
{
- QString key = _combo->currentItem();
+ TQString key = _combo->currentItem();
const ::Programmer::Group &group = *::Programmer::lister().group(key);
bool isHardware = !group.isSoftware();
bool hasTab = ( _tabWidget->indexOf(_portSelectorContainer)!=-1 );
if (isHardware) {
if ( !hasTab ) {
KIconLoader loader;
- QPixmap icon = loader.loadIcon("connect_creating", KIcon::Small);
+ TQPixmap icon = loader.loadIcon("connect_creating", KIcon::Small);
_tabWidget->insertTab(_portSelectorContainer, icon, i18n("Port Selection"), 0);
}
} else if (hasTab) _tabWidget->removePage(_portSelectorContainer);
_portSelector->setGroup(group);
_stack->setCurrentItem(key);
- if (isHardware) QTimer::singleShot(0, this, SLOT(portChanged()));
+ if (isHardware) TQTimer::singleShot(0, this, TQT_SLOT(portChanged()));
}