summaryrefslogtreecommitdiffstats
path: root/kspread/dialogs/kspread_dlg_reference.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/dialogs/kspread_dlg_reference.cc
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/dialogs/kspread_dlg_reference.cc')
-rw-r--r--kspread/dialogs/kspread_dlg_reference.cc138
1 files changed, 69 insertions, 69 deletions
diff --git a/kspread/dialogs/kspread_dlg_reference.cc b/kspread/dialogs/kspread_dlg_reference.cc
index 5c7faf2b..1fbb55e3 100644
--- a/kspread/dialogs/kspread_dlg_reference.cc
+++ b/kspread/dialogs/kspread_dlg_reference.cc
@@ -35,12 +35,12 @@
#include "selection.h"
#include "kspread_locale.h"
-#include <qvariant.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqvariant.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include <kbuttonbox.h>
#include <kmessagebox.h>
@@ -51,22 +51,22 @@
using namespace KSpread;
-reference::reference( View* parent, const char* name )
- : QDialog( parent, name,TRUE )
+reference::reference( View* tqparent, const char* name )
+ : TQDialog( tqparent, name,TRUE )
{
- m_pView = parent;
- QVBoxLayout *lay1 = new QVBoxLayout( this );
+ m_pView = tqparent;
+ TQVBoxLayout *lay1 = new TQVBoxLayout( this );
lay1->setMargin( KDialog::marginHint() );
lay1->setSpacing( KDialog::spacingHint() );
- m_list = new QListBox(this);
+ m_list = new TQListBox(this);
lay1->addWidget( m_list );
setCaption( i18n("Area Name") );
- m_rangeName = new QLabel(this);
+ m_rangeName = new TQLabel(this);
lay1->addWidget(m_rangeName);
- m_pRemove = new QPushButton(i18n("&Remove"), this);
+ m_pRemove = new TQPushButton(i18n("&Remove"), this);
lay1->addWidget( m_pRemove );
//m_pRemove->setEnabled(false);
KButtonBox *bb = new KButtonBox( this );
@@ -75,23 +75,23 @@ reference::reference( View* parent, const char* name )
m_pOk = bb->addButton( KStdGuiItem::ok() );
m_pCancel = bb->addButton( KStdGuiItem::cancel() );
m_pOk->setDefault( TRUE );
- bb->layout();
+ bb->tqlayout();
lay1->addWidget( bb );
- QString text;
- QStringList sheetName;
- QPtrListIterator<Sheet> it2 ( m_pView->doc()->map()->sheetList() );
+ TQString text;
+ TQStringList sheetName;
+ TQPtrListIterator<Sheet> it2 ( m_pView->doc()->map()->sheetList() );
for( ; it2.current(); ++it2 )
{
sheetName.append( it2.current()->sheetName());
}
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area = m_pView->doc()->listArea();
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area = m_pView->doc()->listArea();
for ( it = area.begin(); it != area.end(); ++it )
{
text = (*it).ref_name;
- if ( sheetName.contains((*it).sheet_name ))
+ if ( sheetName.tqcontains((*it).sheet_name ))
m_list->insertItem(text);
}
@@ -102,24 +102,24 @@ reference::reference( View* parent, const char* name )
m_pEdit->setEnabled( false );
}
- connect( m_pOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
- connect( m_pCancel, SIGNAL( clicked() ), this, SLOT( slotCancel() ) );
- connect( m_pEdit, SIGNAL( clicked() ), this, SLOT( slotEdit() ) );
- connect( m_pRemove, SIGNAL( clicked() ), this, SLOT( slotRemove() ) );
- connect( m_list, SIGNAL(doubleClicked(QListBoxItem *)), this,
- SLOT(slotDoubleClicked(QListBoxItem *)));
- connect( m_list, SIGNAL(highlighted ( QListBoxItem * ) ), this,
- SLOT(slotHighlighted(QListBoxItem * )));
- m_rangeName->setText(i18n("Area: %1").arg(""));
+ connect( m_pOk, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( m_pCancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCancel() ) );
+ connect( m_pEdit, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEdit() ) );
+ connect( m_pRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemove() ) );
+ connect( m_list, TQT_SIGNAL(doubleClicked(TQListBoxItem *)), this,
+ TQT_SLOT(slotDoubleClicked(TQListBoxItem *)));
+ connect( m_list, TQT_SIGNAL(highlighted ( TQListBoxItem * ) ), this,
+ TQT_SLOT(slotHighlighted(TQListBoxItem * )));
+ m_rangeName->setText(i18n("Area: %1").tqarg(""));
resize( 250, 200 );
}
-void reference::displayAreaValues(QString const & areaName)
+void reference::displayAreaValues(TQString const & areaName)
{
- QString tmpName;
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area( m_pView->doc()->listArea() );
+ TQString tmpName;
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area( m_pView->doc()->listArea() );
for ( it = area.begin(); it != area.end(); ++it )
{
if ((*it).ref_name == areaName)
@@ -134,17 +134,17 @@ void reference::displayAreaValues(QString const & areaName)
}
}
- tmpName = i18n("Area: %1").arg(tmpName);
+ tmpName = i18n("Area: %1").tqarg(tmpName);
m_rangeName->setText(tmpName);
}
-void reference::slotHighlighted(QListBoxItem * )
+void reference::slotHighlighted(TQListBoxItem * )
{
- QString tmp = m_list->text(m_list->currentItem());
+ TQString tmp = m_list->text(m_list->currentItem());
displayAreaValues(tmp);
}
-void reference::slotDoubleClicked(QListBoxItem *)
+void reference::slotDoubleClicked(TQListBoxItem *)
{
slotOk();
}
@@ -158,19 +158,19 @@ void reference::slotRemove()
if (ret == KMessageBox::Cancel)
return;
- QString textRemove;
+ TQString textRemove;
if ( m_list->currentItem() != -1)
{
m_pView->doc()->emitBeginOperation( false );
- QString textRemove = m_list->text(m_list->currentItem());
+ TQString textRemove = m_list->text(m_list->currentItem());
m_pView->doc()->removeArea(textRemove );
m_pView->doc()->setModified(true);
/*
m_list->clear();
- QString text;
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area=m_pView->doc()->listArea();
+ TQString text;
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area=m_pView->doc()->listArea();
for ( it = area.begin(); it != area.end(); ++it )
{
text=(*it).ref_name;
@@ -200,14 +200,14 @@ void reference::slotRemove()
void reference::slotEdit()
{
- QString name(m_list->text(m_list->currentItem()));
+ TQString name(m_list->text(m_list->currentItem()));
if ( name.isEmpty() )
return;
EditAreaName editDlg( m_pView, "EditArea", name );
editDlg.exec();
- m_rangeName->setText(i18n("Area: %1").arg(""));
- QString tmp = m_list->text(m_list->currentItem());
+ m_rangeName->setText(i18n("Area: %1").tqarg(""));
+ TQString tmp = m_list->text(m_list->currentItem());
if (!tmp.isEmpty())
displayAreaValues( tmp );
}
@@ -216,12 +216,12 @@ void reference::slotOk()
{
m_pView->doc()->emitBeginOperation( false );
- QString text;
+ TQString text;
if (m_list->currentItem() != -1)
{
int index = m_list->currentItem();
text = m_list->text(index);
- QValueList<Reference> area = m_pView->doc()->listArea();
+ TQValueList<Reference> area = m_pView->doc()->listArea();
if (m_pView->activeSheet()->sheetName() != area[ index ].sheet_name)
{
@@ -246,60 +246,60 @@ void reference::slotCancel()
-EditAreaName::EditAreaName( View * parent,
+EditAreaName::EditAreaName( View * tqparent,
const char * name,
- QString const & areaname )
- : KDialogBase( parent, name ,true,i18n( "Edit Area" ) , Ok|Cancel )
+ TQString const & areaname )
+ : KDialogBase( tqparent, name ,true,i18n( "Edit Area" ) , Ok|Cancel )
{
- m_pView = parent;
+ m_pView = tqparent;
resize( 350, 142 );
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5,
- (QSizePolicy::SizeType)4, 0, 0,
+ tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5,
+ (TQSizePolicy::SizeType)4, 0, 0,
sizePolicy().hasHeightForWidth() ) );
- QWidget * page = new QWidget( this );
+ TQWidget * page = new TQWidget( this );
setMainWidget(page);
- QGridLayout * EditAreaNameLayout
- = new QGridLayout( page, 1, 1, 11, 6, "EditAreaNameLayout");
+ TQGridLayout * EditAreaNameLayout
+ = new TQGridLayout( page, 1, 1, 11, 6, "EditAreaNameLayout");
- QHBoxLayout * Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
- QSpacerItem * spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding,
- QSizePolicy::Minimum );
+ TQHBoxLayout * Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1");
+ TQSpacerItem * spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum );
Layout1->addItem( spacer );
EditAreaNameLayout->addMultiCellLayout( Layout1, 3, 3, 0, 1 );
- QLabel * TextLabel4 = new QLabel( page, "TextLabel4" );
+ TQLabel * TextLabel4 = new TQLabel( page, "TextLabel4" );
TextLabel4->setText( i18n( "Cells:" ) );
EditAreaNameLayout->addWidget( TextLabel4, 2, 0 );
- m_area = new QLineEdit( page, "m_area" );
+ m_area = new TQLineEdit( page, "m_area" );
EditAreaNameLayout->addWidget( m_area, 2, 1 );
- QLabel * TextLabel1 = new QLabel( page, "TextLabel1" );
+ TQLabel * TextLabel1 = new TQLabel( page, "TextLabel1" );
TextLabel1->setText( i18n( "Sheet:" ) );
EditAreaNameLayout->addWidget( TextLabel1, 1, 0 );
- m_sheets = new QComboBox( FALSE, page, "m_sheets" );
+ m_sheets = new TQComboBox( FALSE, page, "m_sheets" );
EditAreaNameLayout->addWidget( m_sheets, 1, 1 );
- QLabel * TextLabel2 = new QLabel( page, "TextLabel2" );
+ TQLabel * TextLabel2 = new TQLabel( page, "TextLabel2" );
TextLabel2->setText( i18n( "Area name:" ) );
EditAreaNameLayout->addWidget( TextLabel2, 0, 0 );
- m_areaName = new QLabel( page, "m_areaName" );
+ m_areaName = new TQLabel( page, "m_areaName" );
m_areaName->setText( areaname );
EditAreaNameLayout->addWidget( m_areaName, 0, 1 );
- QPtrList<Sheet> sheetList = m_pView->doc()->map()->sheetList();
+ TQPtrList<Sheet> sheetList = m_pView->doc()->map()->sheetList();
for (unsigned int c = 0; c < sheetList.count(); ++c)
{
Sheet * t = sheetList.at(c);
@@ -308,9 +308,9 @@ EditAreaName::EditAreaName( View * parent,
m_sheets->insertItem( t->sheetName() );
}
- QString tmpName;
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area(m_pView->doc()->listArea());
+ TQString tmpName;
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area(m_pView->doc()->listArea());
for ( it = area.begin(); it != area.end(); ++it )
{
if ((*it).ref_name == areaname)