summaryrefslogtreecommitdiffstats
path: root/kspread/plugins
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
commit04766b207afba7961d4d802313e426f5a2fbef63 (patch)
treec888ea1027c793e2d0386a7e5a1a0cd077b03cb3 /kspread/plugins
parentb6edfe41c9395f2e20784cbf0e630af6426950a3 (diff)
downloadkoffice-04766b207afba7961d4d802313e426f5a2fbef63.tar.gz
koffice-04766b207afba7961d4d802313e426f5a2fbef63.zip
rename the following methods:
tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/plugins')
-rw-r--r--kspread/plugins/calculator/configdlg.cpp6
-rw-r--r--kspread/plugins/calculator/configdlg.h2
-rw-r--r--kspread/plugins/calculator/dlabel.cpp4
-rw-r--r--kspread/plugins/calculator/dlabel.h2
-rw-r--r--kspread/plugins/calculator/kcalc.cpp4
-rw-r--r--kspread/plugins/calculator/kcalc.h2
-rw-r--r--kspread/plugins/calculator/kcalc_core.cpp8
-rw-r--r--kspread/plugins/calculator/main.cpp22
-rw-r--r--kspread/plugins/calculator/main.h6
-rw-r--r--kspread/plugins/insertcalendar/kspread_insertcalendardialog.cc4
-rw-r--r--kspread/plugins/insertcalendar/kspread_insertcalendardialog.h2
-rw-r--r--kspread/plugins/insertcalendar/kspread_plugininsertcalendar.cc12
-rw-r--r--kspread/plugins/insertcalendar/kspread_plugininsertcalendar.h4
-rw-r--r--kspread/plugins/scripting/scripting.cc10
-rw-r--r--kspread/plugins/scripting/scripting.h2
-rwxr-xr-xkspread/plugins/scripting/scripts/exporthtml/ExportHtml.py4
-rwxr-xr-xkspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py110
17 files changed, 102 insertions, 102 deletions
diff --git a/kspread/plugins/calculator/configdlg.cpp b/kspread/plugins/calculator/configdlg.cpp
index 545ddcb5..cec64193 100644
--- a/kspread/plugins/calculator/configdlg.cpp
+++ b/kspread/plugins/calculator/configdlg.cpp
@@ -38,8 +38,8 @@
#undef HAVE_LONG_DOUBLE
#endif
-ConfigDlg::ConfigDlg(TQWidget *tqparent, const char *name, DefStruct *defstruct)
- : TQDialog(tqparent, name)
+ConfigDlg::ConfigDlg(TQWidget *parent, const char *name, DefStruct *defstruct)
+ : TQDialog(parent, name)
{
defst = defstruct;
@@ -158,7 +158,7 @@ ConfigDlg::ConfigDlg(TQWidget *tqparent, const char *name, DefStruct *defstruct)
connect(button3,TQT_SIGNAL(clicked()),this,TQT_SLOT(help()));
lay1->addWidget(box);
- connect(tqparent,TQT_SIGNAL(applyButtonPressed()),TQT_SLOT(okButton()));
+ connect(parent,TQT_SIGNAL(applyButtonPressed()),TQT_SLOT(okButton()));
}
void ConfigDlg::help()
diff --git a/kspread/plugins/calculator/configdlg.h b/kspread/plugins/calculator/configdlg.h
index 7462f028..2cb99912 100644
--- a/kspread/plugins/calculator/configdlg.h
+++ b/kspread/plugins/calculator/configdlg.h
@@ -53,7 +53,7 @@ Q_OBJECT
public:
- ConfigDlg(TQWidget *tqparent=0, const char *name=0, DefStruct *defstruct=NULL);
+ ConfigDlg(TQWidget *parent=0, const char *name=0, DefStruct *defstruct=NULL);
~ConfigDlg() {}
diff --git a/kspread/plugins/calculator/dlabel.cpp b/kspread/plugins/calculator/dlabel.cpp
index 011642c5..c051d0f3 100644
--- a/kspread/plugins/calculator/dlabel.cpp
+++ b/kspread/plugins/calculator/dlabel.cpp
@@ -26,8 +26,8 @@
#include "dlabel.h"
-DLabel::DLabel(TQWidget *tqparent, const char *name)
- :TQLabel(tqparent,name){
+DLabel::DLabel(TQWidget *parent, const char *name)
+ :TQLabel(parent,name){
button = 0;
lit = false;
diff --git a/kspread/plugins/calculator/dlabel.h b/kspread/plugins/calculator/dlabel.h
index 1ed80096..58e6bda5 100644
--- a/kspread/plugins/calculator/dlabel.h
+++ b/kspread/plugins/calculator/dlabel.h
@@ -39,7 +39,7 @@ Q_OBJECT
public:
-DLabel(TQWidget *tqparent=0, const char *name=0);
+DLabel(TQWidget *parent=0, const char *name=0);
~DLabel() {}
diff --git a/kspread/plugins/calculator/kcalc.cpp b/kspread/plugins/calculator/kcalc.cpp
index dc92e9f5..4c80e7b4 100644
--- a/kspread/plugins/calculator/kcalc.cpp
+++ b/kspread/plugins/calculator/kcalc.cpp
@@ -43,8 +43,8 @@ extern num_base current_base;
TQPtrList<CALCAMNT> temp_stack;
-TQtCalculator :: TQtCalculator( Calculator *_corba, TQWidget *tqparent, const char *name )
- : TQDialog( tqparent, name )
+TQtCalculator :: TQtCalculator( Calculator *_corba, TQWidget *parent, const char *name )
+ : TQDialog( parent, name )
{
corba = _corba;
diff --git a/kspread/plugins/calculator/kcalc.h b/kspread/plugins/calculator/kcalc.h
index 7e665e6c..dfa67b63 100644
--- a/kspread/plugins/calculator/kcalc.h
+++ b/kspread/plugins/calculator/kcalc.h
@@ -203,7 +203,7 @@ class TQtCalculator : public TQDialog
public:
- TQtCalculator( Calculator* _corba, TQWidget *tqparent=0, const char *name=0 );
+ TQtCalculator( Calculator* _corba, TQWidget *parent=0, const char *name=0 );
~TQtCalculator();
void keyPressEvent( TQKeyEvent *e );
diff --git a/kspread/plugins/calculator/kcalc_core.cpp b/kspread/plugins/calculator/kcalc_core.cpp
index 7a6f8209..bdba8469 100644
--- a/kspread/plugins/calculator/kcalc_core.cpp
+++ b/kspread/plugins/calculator/kcalc_core.cpp
@@ -1720,11 +1720,11 @@ int cvb(char *out_str, long amount, int max_digits)
lead_one = 1,
lead_one_count = 0,
work_size = sizeof(amount) * CHAR_BIT;
- unsigned long bit_tqmask = (1 << ((sizeof(amount) * CHAR_BIT) - 1));
+ unsigned long bit_mask = (1 << ((sizeof(amount) * CHAR_BIT) - 1));
- while (bit_tqmask) {
+ while (bit_mask) {
- if (amount & bit_tqmask) {
+ if (amount & bit_mask) {
if (lead_one)
lead_one_count++;
lead_zero = 0;
@@ -1734,7 +1734,7 @@ int cvb(char *out_str, long amount, int max_digits)
if (!lead_zero)
work_str[work_char++] = '0';
}
- bit_tqmask >>= 1;
+ bit_mask >>= 1;
}
if (!work_char)
work_str[work_char++] = '0';
diff --git a/kspread/plugins/calculator/main.cpp b/kspread/plugins/calculator/main.cpp
index c6efb99f..2f1a0b89 100644
--- a/kspread/plugins/calculator/main.cpp
+++ b/kspread/plugins/calculator/main.cpp
@@ -43,8 +43,8 @@ K_EXPORT_COMPONENT_FACTORY( libkspreadcalc, CalcFactory )
KInstance* CalcFactory::s_global = 0;
-CalcFactory::CalcFactory( TQObject* tqparent, const char* name )
- : KLibFactory( tqparent, name )
+CalcFactory::CalcFactory( TQObject* parent, const char* name )
+ : KLibFactory( parent, name )
{
s_global = new KInstance( "kspreadcalc" );
}
@@ -54,15 +54,15 @@ CalcFactory::~CalcFactory()
delete s_global;
}
-TQObject* CalcFactory::createObject( TQObject* tqparent, const char* name, const char* /*classname*/, const TQStringList & )
+TQObject* CalcFactory::createObject( TQObject* parent, const char* name, const char* /*classname*/, const TQStringList & )
{
- if ( !tqparent->inherits("KSpread::View") )
+ if ( !parent->inherits("KSpread::View") )
{
- kdError() << "CalcFactory: KSpread::View expected. Parent is " << tqparent->className() << endl;
+ kdError() << "CalcFactory: KSpread::View expected. Parent is " << parent->className() << endl;
return 0;
}
- TQObject *obj = new Calculator( (View*)tqparent, name );
+ TQObject *obj = new Calculator( (View*)parent, name );
return obj;
}
@@ -77,14 +77,14 @@ KInstance* CalcFactory::global()
*
***************************************************/
-Calculator::Calculator( View* tqparent, const char* name )
- : KParts::Plugin( tqparent, name )
+Calculator::Calculator( View* parent, const char* name )
+ : KParts::Plugin( parent, name )
{
m_calc = 0;
- m_view = tqparent;
+ m_view = parent;
KGlobal::locale()->insertCatalogue("kspreadcalc_calc");
- tqparent->installEventFilter( this );
+ parent->installEventFilter( this );
(void)new KAction( i18n("Calculator"), SmallIcon("kcalc", CalcFactory::global()),
0, this, TQT_SLOT( showCalculator() ), actionCollection(), "kspreadcalc");
@@ -99,7 +99,7 @@ void Calculator::showCalculator()
return;
}
- m_calc = new TQtCalculator( this, (View*)tqparent() );
+ m_calc = new TQtCalculator( this, (View*)parent() );
m_calc->setFixedSize( 9 + 100 + 9 + 233 + 9, 239);
m_calc->show();
m_calc->raise();
diff --git a/kspread/plugins/calculator/main.h b/kspread/plugins/calculator/main.h
index dc5eb3a5..a0284b20 100644
--- a/kspread/plugins/calculator/main.h
+++ b/kspread/plugins/calculator/main.h
@@ -42,10 +42,10 @@ class CalcFactory : public KLibFactory
Q_OBJECT
TQ_OBJECT
public:
- CalcFactory( TQObject* tqparent = 0, const char* name = 0 );
+ CalcFactory( TQObject* parent = 0, const char* name = 0 );
~CalcFactory();
- virtual TQObject* createObject( TQObject* tqparent = 0, const char* name = 0,
+ virtual TQObject* createObject( TQObject* parent = 0, const char* name = 0,
const char* classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList() );
static KInstance* global();
@@ -59,7 +59,7 @@ class KSPREAD_EXPORT Calculator : public KParts::Plugin
Q_OBJECT
TQ_OBJECT
public:
- Calculator( View* tqparent, const char* name = 0 );
+ Calculator( View* parent, const char* name = 0 );
~Calculator();
View* view() { return m_view; }
diff --git a/kspread/plugins/insertcalendar/kspread_insertcalendardialog.cc b/kspread/plugins/insertcalendar/kspread_insertcalendardialog.cc
index 4a465eed..d55c332b 100644
--- a/kspread/plugins/insertcalendar/kspread_insertcalendardialog.cc
+++ b/kspread/plugins/insertcalendar/kspread_insertcalendardialog.cc
@@ -33,8 +33,8 @@
namespace KSpread
{
-InsertCalendarDialog::InsertCalendarDialog(TQWidget* tqparent, const char* name)
-: InsertCalendarDialogBase(tqparent,name)
+InsertCalendarDialog::InsertCalendarDialog(TQWidget* parent, const char* name)
+: InsertCalendarDialogBase(parent,name)
{
this->m_datePicker = NULL;
diff --git a/kspread/plugins/insertcalendar/kspread_insertcalendardialog.h b/kspread/plugins/insertcalendar/kspread_insertcalendardialog.h
index f68ab4c6..11b0670a 100644
--- a/kspread/plugins/insertcalendar/kspread_insertcalendardialog.h
+++ b/kspread/plugins/insertcalendar/kspread_insertcalendardialog.h
@@ -56,7 +56,7 @@ class KSPREAD_EXPORT InsertCalendarDialog : public InsertCalendarDialogBase
* The dates in the dialog initialize to a complete calendar for the
* current month.
*/
- InsertCalendarDialog(TQWidget* tqparent = 0, const char* name = 0);
+ InsertCalendarDialog(TQWidget* parent = 0, const char* name = 0);
/**
* Virtual destructor.
diff --git a/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.cc b/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.cc
index 558f59cb..1bb16a95 100644
--- a/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.cc
+++ b/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.cc
@@ -50,15 +50,15 @@ typedef KGenericFactory<PluginInsertCalendar> InsertCalendarFactory;
K_EXPORT_COMPONENT_FACTORY( libkspreadinsertcalendar, InsertCalendarFactory("kspreadinsertcalendar"))
-PluginInsertCalendar::PluginInsertCalendar( TQObject *tqparent, const char *name, const TQStringList& /*args*/ )
-: Plugin(tqparent,name)
+PluginInsertCalendar::PluginInsertCalendar( TQObject *parent, const char *name, const TQStringList& /*args*/ )
+: Plugin(parent,name)
{
this->m_kspreadView = NULL;
- if (tqparent)
+ if (parent)
{
- if (tqparent->inherits("KSpread::View"))
+ if (parent->inherits("KSpread::View"))
{
- this->m_kspreadView = (View*)tqparent;
+ this->m_kspreadView = (View*)parent;
}
else
{
@@ -67,7 +67,7 @@ PluginInsertCalendar::PluginInsertCalendar( TQObject *tqparent, const char *name
}
else
{
- kdWarning() << "Plugin created without a tqparent!!!" << endl;
+ kdWarning() << "Plugin created without a parent!!!" << endl;
}
diff --git a/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.h b/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.h
index be93fea5..e0c2ef89 100644
--- a/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.h
+++ b/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.h
@@ -57,7 +57,7 @@ class KSPREAD_EXPORT PluginInsertCalendar : public KParts::Plugin
protected:
/**
- * This is the tqparent part of the plugin. It is used
+ * This is the parent part of the plugin. It is used
* to access the spreadsheet and actually insert the
* calendar.
*
@@ -78,7 +78,7 @@ class KSPREAD_EXPORT PluginInsertCalendar : public KParts::Plugin
/**
* Constructor. This constructor is usable with KGenericFactory.
*/
- PluginInsertCalendar( TQObject *tqparent, const char *name, const TQStringList& args );
+ PluginInsertCalendar( TQObject *parent, const char *name, const TQStringList& args );
/**
* Virtual destructor.
diff --git a/kspread/plugins/scripting/scripting.cc b/kspread/plugins/scripting/scripting.cc
index e4299e26..44f8fa01 100644
--- a/kspread/plugins/scripting/scripting.cc
+++ b/kspread/plugins/scripting/scripting.cc
@@ -37,21 +37,21 @@
typedef KGenericFactory<Scripting> KSpreadScriptingFactory;
K_EXPORT_COMPONENT_FACTORY( kspreadscripting, KSpreadScriptingFactory( "kspreadscripting" ) )
-Scripting::Scripting(TQObject *tqparent, const char *name, const TQStringList &)
- : KParts::Plugin(tqparent, name)
+Scripting::Scripting(TQObject *parent, const char *name, const TQStringList &)
+ : KParts::Plugin(parent, name)
{
setInstance(KSpreadScriptingFactory::instance());
kdDebug() << "Scripting plugin. Class: "
<< tqmetaObject()->className()
<< ", Parent: "
- << tqparent->tqmetaObject()->className()
+ << parent->tqmetaObject()->className()
<< "\n";
- if ( tqparent->inherits("KSpread::View") )
+ if ( parent->inherits("KSpread::View") )
{
setInstance(Scripting::instance());
- m_view = (KSpread::View*) tqparent;
+ m_view = (KSpread::View*) parent;
m_scriptguiclient = new Kross::Api::ScriptGUIClient( m_view, m_view );
// m_scriptguiclient ->setXMLFile(locate("data","kspreadplugins/scripting.rc"), true);
kdDebug() << "Setup actions for scripting !" << endl;
diff --git a/kspread/plugins/scripting/scripting.h b/kspread/plugins/scripting/scripting.h
index b8bd3a55..4fb8112f 100644
--- a/kspread/plugins/scripting/scripting.h
+++ b/kspread/plugins/scripting/scripting.h
@@ -37,7 +37,7 @@ class Scripting : public KParts::Plugin
Q_OBJECT
TQ_OBJECT
public:
- Scripting(TQObject *tqparent, const char *name, const TQStringList &);
+ Scripting(TQObject *parent, const char *name, const TQStringList &);
virtual ~Scripting();
private slots:
void executionFinished(const Kross::Api::ScriptAction*);
diff --git a/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py b/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
index d4ab99ed..a34a4dd1 100755
--- a/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
+++ b/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
@@ -21,14 +21,14 @@ except (ImportError):
raise "Failed to import the required PyQt python module."
class Dialog(qt.QDialog):
- def __init__(self, scriptpath, tqparent):
+ def __init__(self, scriptpath, parent):
self.scriptpath = scriptpath
import krosskspreadcore
self.doc = krosskspreadcore.get("KSpreadDocument")
import qt
- qt.QDialog.__init__(self, tqparent, "Dialog", 1, qt.Qt.WDestructiveClose)
+ qt.QDialog.__init__(self, parent, "Dialog", 1, qt.Qt.WDestructiveClose)
self.setCaption("Export to HTML File")
tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
diff --git a/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py b/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py
index f434bce5..7afde8b9 100755
--- a/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py
+++ b/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py
@@ -54,8 +54,8 @@ class EditWidget(Widget):
return self.edit.text()
class FileWidget(Widget):
- def __init__(self, parentwidget, label, filtertqmask, openfiledialog = True):
- self.filtertqmask = filtertqmask
+ def __init__(self, parentwidget, label, filtermask, openfiledialog = True):
+ self.filtermask = filtermask
self.openfiledialog = openfiledialog
import qt
global Widget
@@ -68,9 +68,9 @@ class FileWidget(Widget):
import qt
text = str( self.edit.text() )
if self.openfiledialog:
- filename = str( qt.QFileDialog.getOpenFileName(text, self.filtertqmask, self.parentwidget) )
+ filename = str( qt.QFileDialog.getOpenFileName(text, self.filtermask, self.parentwidget) )
else:
- filename = qt.QFileDialog.getSaveFileName(text, self.filtertqmask, self.parentwidget)
+ filename = qt.QFileDialog.getSaveFileName(text, self.filtermask, self.parentwidget)
if filename != "": self.edit.setText( filename )
def value(self):
return self.edit.text()
@@ -105,9 +105,9 @@ class Samples:
class PrintDriverDetails:
""" Print a the list of available KexiDB drivers and print details about one of them. """
name = "Details about a driver"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
- "DriverName" : Samples.KexiDB._DriverWidget( tqparent.parentwidget ),
+ "DriverName" : Samples.KexiDB._DriverWidget( parent.parentwidget ),
}
def getCode(self):
return (
@@ -125,9 +125,9 @@ class Samples:
class ConnectWithFile:
""" Connect with a KexiDB database by using a Kexi Connection Project File. """
name = "Connect with file"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
- "ProjectFile" : Samples.KexiDB._ProjectWidget( tqparent.parentwidget ),
+ "ProjectFile" : Samples.KexiDB._ProjectWidget( parent.parentwidget ),
}
def getCode(self):
return (
@@ -164,10 +164,10 @@ class Samples:
class IterateThroughTable:
""" Iterate through a table within a connected KexiDB database. """
name = "Iterate through table"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
- "ProjectFile" : Samples.KexiDB._ProjectWidget( tqparent.parentwidget ),
- "TableName" : Samples.KexiDB._TableWidget( tqparent.parentwidget ),
+ "ProjectFile" : Samples.KexiDB._ProjectWidget( parent.parentwidget ),
+ "TableName" : Samples.KexiDB._TableWidget( parent.parentwidget ),
}
def getCode(self):
return (
@@ -261,12 +261,12 @@ class Samples:
class SetTextOfCells:
""" Set the text of the defined cells. """
name = "Set text of cells"
- def __init__(self, tqparent):
+ def __init__(self, parent):
pass
self.widgets = {
- "SheetName" : Samples.KSpread._SheetWidget( tqparent.parentwidget ),
- "Cells" : Samples.KSpread._CellsWidget( tqparent.parentwidget ),
- "Value" : Samples.KSpread._ValueWidget( tqparent.parentwidget ),
+ "SheetName" : Samples.KSpread._SheetWidget( parent.parentwidget ),
+ "Cells" : Samples.KSpread._CellsWidget( parent.parentwidget ),
+ "Value" : Samples.KSpread._ValueWidget( parent.parentwidget ),
}
def getCode(self):
return (
@@ -292,13 +292,13 @@ class Samples:
class SetColorsOfCells:
""" Set the colors of the defined cells. """
name = "Set colors of cells"
- def __init__(self, tqparent):
+ def __init__(self, parent):
pass
self.widgets = {
- "SheetName" : Samples.KSpread._SheetWidget( tqparent.parentwidget),
- "Cells" : Samples.KSpread._CellsWidget( tqparent.parentwidget ),
- "TextColor" : Samples.KSpread._ColorWidget( tqparent.parentwidget, "Textcolor", "ff0000" ),
- "BackgroundColor" : Samples.KSpread._ColorWidget( tqparent.parentwidget, "Backgroundcolor", "c0c0c0" ),
+ "SheetName" : Samples.KSpread._SheetWidget( parent.parentwidget),
+ "Cells" : Samples.KSpread._CellsWidget( parent.parentwidget ),
+ "TextColor" : Samples.KSpread._ColorWidget( parent.parentwidget, "Textcolor", "ff0000" ),
+ "BackgroundColor" : Samples.KSpread._ColorWidget( parent.parentwidget, "Backgroundcolor", "c0c0c0" ),
}
def getCode(self):
return (
@@ -324,10 +324,10 @@ class Samples:
class IterateThroughCellsWithContent:
""" Iterate over all cells in a sheet that have content (aka that are not empty). """
name = "Iterate through cells"
- def __init__(self, tqparent):
+ def __init__(self, parent):
pass
self.widgets = {
- "SheetName" : Samples.KSpread._SheetWidget( tqparent.parentwidget ),
+ "SheetName" : Samples.KSpread._SheetWidget( parent.parentwidget ),
}
def getCode(self):
return (
@@ -352,9 +352,9 @@ class Samples:
class PrintSheetDetails:
""" Print details about the current sheet. """
name = "Details about a sheet"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
- "SheetName" : Samples.KSpread._SheetWidget( tqparent.parentwidget ),
+ "SheetName" : Samples.KSpread._SheetWidget( parent.parentwidget ),
}
def getCode(self):
return (
@@ -376,10 +376,10 @@ class Samples:
class LoadDocFromNativeXML:
""" Load the document from a native XML file. """
name = "Load document from native XML File"
- def __init__(self, tqparent):
+ def __init__(self, parent):
global FileWidget
self.widgets = {
- "FileName" : FileWidget( tqparent.parentwidget, "XML File:", "*.xml;;*" ),
+ "FileName" : FileWidget( parent.parentwidget, "XML File:", "*.xml;;*" ),
}
def getCode(self):
return (
@@ -413,10 +413,10 @@ class Samples:
class SaveDocToNativeXML:
""" Save the document to a native XML file. """
name = "Save document to native XML File"
- def __init__(self, tqparent):
+ def __init__(self, parent):
global FileWidget
self.widgets = {
- "FileName" : FileWidget( tqparent.parentwidget, "XML File:", "*.xml;;*", False ),
+ "FileName" : FileWidget( parent.parentwidget, "XML File:", "*.xml;;*", False ),
}
def getCode(self):
return (
@@ -451,10 +451,10 @@ class Samples:
class CopySheets:
""" Copy the text-content from one sheet to another. """
name = "Copy sheets"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
- "SourceSheet" : Samples.KSpread._SheetWidget( tqparent.parentwidget, "Source sheet:" ),
- "TargetSheet" : Samples.KSpread._SheetWidget( tqparent.parentwidget, "Target sheet:" ),
+ "SourceSheet" : Samples.KSpread._SheetWidget( parent.parentwidget, "Source sheet:" ),
+ "TargetSheet" : Samples.KSpread._SheetWidget( parent.parentwidget, "Target sheet:" ),
}
def getCode(self):
return (
@@ -480,10 +480,10 @@ class Samples:
class LoadSheetFromCSV:
""" Load the content of a CSV file into a KSpread sheet. """
name = "Load data from CSV file into sheet"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
- "Sheet" : Samples.KSpread._SheetWidget( tqparent.parentwidget ),
- "FileName" : FileWidget( tqparent.parentwidget, "CSV File:", "*.csv;;*", True ),
+ "Sheet" : Samples.KSpread._SheetWidget( parent.parentwidget ),
+ "FileName" : FileWidget( parent.parentwidget, "CSV File:", "*.csv;;*", True ),
}
def getCode(self):
return (
@@ -519,10 +519,10 @@ class Samples:
class SaveSheetToCSV:
""" Save the content of a KSpread sheet into a CSV file. """
name = "Save data from a sheet into a CSV file"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
- "Sheet" : Samples.KSpread._SheetWidget( tqparent.parentwidget ),
- "FileName" : FileWidget( tqparent.parentwidget, "CSV File:", "*.csv;;*", False ),
+ "Sheet" : Samples.KSpread._SheetWidget( parent.parentwidget ),
+ "FileName" : FileWidget( parent.parentwidget, "CSV File:", "*.csv;;*", False ),
}
def getCode(self):
return (
@@ -563,10 +563,10 @@ class Samples:
class OpenFileDialog:
""" Show the usage of the openfile dialog with QFileDialog. """
name = "Open File Dialog"
- def __init__(self, tqparent):
+ def __init__(self, parent):
pass
self.widgets = {
- "FileName" : FileWidget( tqparent.parentwidget, "Open File:", "*.txt *.html;;*" ),
+ "FileName" : FileWidget( parent.parentwidget, "Open File:", "*.txt *.html;;*" ),
}
def getCode(self):
return (
@@ -578,10 +578,10 @@ class Samples:
class SaveFileDialog:
""" Show the usage of the savefile dialog with QFileDialog. """
name = "Save File Dialog"
- def __init__(self, tqparent):
+ def __init__(self, parent):
pass
self.widgets = {
- "FileName" : FileWidget( tqparent.parentwidget, "Save File:", "*.txt *.html;;*", False ),
+ "FileName" : FileWidget( parent.parentwidget, "Save File:", "*.txt *.html;;*", False ),
}
def getCode(self):
return (
@@ -593,7 +593,7 @@ class Samples:
class CustomDialog:
""" Show a custom dialog that inherits a QDialog. """
name = "Custom Dialog"
- def __init__(self, tqparent):
+ def __init__(self, parent):
pass
self.widgets = {
}
@@ -602,9 +602,9 @@ class Samples:
'import qt',
'',
'class MyDialog(qt.QDialog):',
- ' def __init__(self, tqparent):',
+ ' def __init__(self, parent):',
' import qt',
- ' qt.QDialog.__init__(self, tqparent, "MyDialog", 1, qt.Qt.WDestructiveClose)',
+ ' qt.QDialog.__init__(self, parent, "MyDialog", 1, qt.Qt.WDestructiveClose)',
' self.setCaption("My Dialog")',
' btn = qt.QPushButton("Click me",self)',
' qt.QObject.connect(btn, qt.SIGNAL("clicked()"), self.buttonClicked)',
@@ -619,11 +619,11 @@ class Samples:
class InputDialog:
""" Show how to use a QInputDialog. """
name = "Input Dialog"
- def __init__(self, tqparent):
+ def __init__(self, parent):
global EditWidget
self.widgets = {
- "Caption" : EditWidget( tqparent.parentwidget, "Caption" ),
- "Message" : EditWidget( tqparent.parentwidget, "Message" ),
+ "Caption" : EditWidget( parent.parentwidget, "Caption" ),
+ "Message" : EditWidget( parent.parentwidget, "Message" ),
}
def getCode(self):
return (
@@ -646,7 +646,7 @@ class Samples:
class PrintClipboard:
""" Print the content from the clipper via DCOP. """
name = "Clipboard content"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
}
def getCode(self):
@@ -663,7 +663,7 @@ class Samples:
class AmarokCollectionInfos:
""" Fetch some collection informations from the amarok collection via DCOP. """
name = "amarok collection infos"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
}
def getCode(self):
@@ -688,7 +688,7 @@ class Samples:
class KopeteContacts:
""" Print the names of all contacts Kopete knows via DCOP. """
name = "Kopete contacts"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
}
def getCode(self):
@@ -711,7 +711,7 @@ class Samples:
class KWordSelectedText:
""" Get the selected text from a KWord instance via DCOP. """
name = "KWord selected text"
- def __init__(self, tqparent):
+ def __init__(self, parent):
self.widgets = {
}
def getCode(self):
@@ -759,9 +759,9 @@ class Samples:
# Dialog implementations.
class SampleDialog(qt.QDialog):
- def __init__(self, tqparent, sampleclazz, samplechildclazz):
+ def __init__(self, parent, sampleclazz, samplechildclazz):
import qt
- qt.QDialog.__init__(self, tqparent, "SampleDialog", 1)
+ qt.QDialog.__init__(self, parent, "SampleDialog", 1)
tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
@@ -817,7 +817,7 @@ class SampleDialog(qt.QDialog):
return code
class MainDialog(qt.QDialog):
- def __init__(self, scriptpath, tqparent):
+ def __init__(self, scriptpath, parent):
self.scriptpath = scriptpath
if not hasattr(__main__,"scripteditorfilename"):
__main__.scripteditorfilename = self.getFileName("myscript.py")
@@ -826,7 +826,7 @@ class MainDialog(qt.QDialog):
self.doc = krosskspreadcore.get("KSpreadDocument")
import os, qt
- qt.QDialog.__init__(self, tqparent, "MainDialog", 1, qt.Qt.WDestructiveClose)
+ qt.QDialog.__init__(self, parent, "MainDialog", 1, qt.Qt.WDestructiveClose)
self.setCaption("Script Editor")
tqlayout = qt.QVBoxLayout(self)