summaryrefslogtreecommitdiffstats
path: root/kig/kig/kig_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kig/kig/kig_part.cpp')
-rw-r--r--kig/kig/kig_part.cpp56
1 files changed, 23 insertions, 33 deletions
diff --git a/kig/kig/kig_part.cpp b/kig/kig/kig_part.cpp
index 1f891bb9..137d0096 100644
--- a/kig/kig/kig_part.cpp
+++ b/kig/kig/kig_part.cpp
@@ -67,9 +67,7 @@
#include <tqpaintdevicemetrics.h>
#include <tqsizepolicy.h>
#include <tqtimer.h>
-#if QT_VERSION >= 0x030100
#include <tqeventloop.h>
-#endif
using namespace std;
@@ -89,13 +87,13 @@ class SetCoordinateSystemAction
{
KigPart& md;
public:
- SetCoordinateSystemAction( KigPart& d, KActionCollection* parent );
+ SetCoordinateSystemAction( KigPart& d, KActionCollection* tqparent );
void slotActivated( int index );
};
SetCoordinateSystemAction::SetCoordinateSystemAction(
- KigPart& d, KActionCollection* parent )
- : KSelectAction( i18n( "&Set Coordinate System" ), 0, parent, "settings_set_coordinate_system" ),
+ KigPart& d, KActionCollection* tqparent )
+ : KSelectAction( i18n( "&Set Coordinate System" ), 0, tqparent, "settings_set_coordinate_system" ),
md( d )
{
setItems( CoordinateSystemFactory::names() );
@@ -114,7 +112,7 @@ class KigPrintDialogPage
: public KPrintDialogPage
{
public:
- KigPrintDialogPage( TQWidget* parent = 0, const char* name = 0 );
+ KigPrintDialogPage( TQWidget* tqparent = 0, const char* name = 0 );
~KigPrintDialogPage();
void getOptions( TQMap<TQString,TQString>& opts, bool );
@@ -126,8 +124,8 @@ private:
TQCheckBox *showaxes;
};
-KigPrintDialogPage::KigPrintDialogPage( TQWidget* parent, const char* name )
- : KPrintDialogPage( parent, name )
+KigPrintDialogPage::KigPrintDialogPage( TQWidget* tqparent, const char* name )
+ : KPrintDialogPage( tqparent, name )
{
setTitle( i18n( "Kig Options" ) );
@@ -167,10 +165,10 @@ bool KigPrintDialogPage::isValid( TQString& )
return true;
}
-KigPart::KigPart( TQWidget *parentWidget, const char *,
- TQObject *parent, const char *name,
+KigPart::KigPart( TQWidget *tqparentWidget, const char *,
+ TQObject *tqparent, const char *name,
const TQStringList& )
- : KParts::ReadWritePart( parent, name ),
+ : KParts::ReadWritePart( tqparent, name ),
mMode( 0 ), mdocument( new KigDocument() )
{
// we need an instance
@@ -179,7 +177,7 @@ KigPart::KigPart( TQWidget *parentWidget, const char *,
mMode = new NormalMode( *this );
// we need a widget, to actually show the document
- m_widget = new KigView(this, false, parentWidget, "kig_view");
+ m_widget = new KigView(this, false, tqparentWidget, "kig_view");
// notify the part that this is our internal widget
setWidget( m_widget );
@@ -260,17 +258,17 @@ void KigPart::setupActions()
KigExportManager::instance()->addMenuAction( this, m_widget->realWidget(),
actionCollection() );
- KAction* a = KStdAction::zoomIn( m_widget, TQT_SLOT( slotZoomIn() ),
+ KAction* a = KStdAction::zoomIn( TQT_TQOBJECT(m_widget), TQT_SLOT( slotZoomIn() ),
actionCollection() );
a->setToolTip( i18n( "Zoom in on the document" ) );
a->setWhatsThis( i18n( "Zoom in on the document" ) );
- a = KStdAction::zoomOut( m_widget, TQT_SLOT( slotZoomOut() ),
+ a = KStdAction::zoomOut( TQT_TQOBJECT(m_widget), TQT_SLOT( slotZoomOut() ),
actionCollection() );
a->setToolTip( i18n( "Zoom out of the document" ) );
a->setWhatsThis( i18n( "Zoom out of the document" ) );
- a = KStdAction::fitToPage( m_widget, TQT_SLOT( slotRecenterScreen() ),
+ a = KStdAction::fitToPage( TQT_TQOBJECT(m_widget), TQT_SLOT( slotRecenterScreen() ),
actionCollection() );
// grr.. why isn't there an icon for this..
a->setIconSet( TQIconSet( l->loadIcon( "view_fit_to_page", KIcon::Toolbar ) ) );
@@ -283,7 +281,7 @@ void KigPart::setupActions()
#endif
#endif
#ifdef KIG_PART_CPP_STD_FULLSCREEN_ACTION
- a = KStdAction::fullScreen( m_widget, TQT_SLOT( toggleFullScreen() ), actionCollection(), (TQWidget*)(widget()->parent()),"fullscreen" );
+ a = KStdAction::fullScreen( TQT_TQOBJECT(m_widget), TQT_SLOT( toggleFullScreen() ), actionCollection(), (TQWidget*)(widget()->tqparent()),"fullscreen" );
#else
tmp = l->loadIcon( "window_fullscreen", KIcon::Toolbar );
a = new KAction(
@@ -296,13 +294,13 @@ void KigPart::setupActions()
// TODO: an icon for this..
a = new KAction(
- i18n( "&Select Shown Area" ), "viewmagfit", 0, m_widget, TQT_SLOT( zoomRect() ),
+ i18n( "&Select Shown Area" ), "viewmagfit", 0, TQT_TQOBJECT(m_widget), TQT_SLOT( zoomRect() ),
actionCollection(), "view_select_shown_rect" );
a->setToolTip( i18n( "Select the area that you want to be shown in the window." ) );
a->setWhatsThis( i18n( "Select the area that you want to be shown in the window." ) );
a = new KAction(
- i18n( "S&elect Zoom Area" ), "viewmag", 0, m_widget, TQT_SLOT( zoomArea() ),
+ i18n( "S&elect Zoom Area" ), "viewmag", 0, TQT_TQOBJECT(m_widget), TQT_SLOT( zoomArea() ),
actionCollection(), "view_zoom_area" );
// a->setToolTip( i18n( "Select the area that you want to be shown in the window." ) );
// a->setWhatsThis( i18n( "Select the area that you want to be shown in the window." ) );
@@ -371,7 +369,7 @@ bool KigPart::openFile()
{
KMessageBox::sorry( widget(),
i18n( "The file \"%1\" you tried to open does not exist. "
- "Please verify that you entered the correct path." ).arg( m_file ),
+ "Please verify that you entered the correct path." ).tqarg( m_file ),
i18n( "File Not Found" ) );
return false;
};
@@ -380,7 +378,7 @@ bool KigPart::openFile()
// findByURL...
KMimeType::Ptr mimeType = KMimeType::findByPath ( m_file );
kdDebug() << k_funcinfo << "mimetype: " << mimeType->name() << endl;
- KigFilter* filter = KigFilters::instance()->find( mimeType->name() );
+ KigFilter* filter = KigFilters::instance()->tqfind( mimeType->name() );
if ( !filter )
{
// we don't support this mime type...
@@ -392,7 +390,7 @@ bool KigPart::openFile()
"question would be worth implementing support for, you can "
"always ask us nicely on mailto:toscano.pino@tiscali.it "
"or do the work yourself and send me a patch."
- ).arg(mimeType->name()),
+ ).tqarg(mimeType->name()),
i18n( "Format Not Supported" )
);
return false;
@@ -468,7 +466,7 @@ void KigPart::_addObject( ObjectHolder* o )
void KigPart::delObject( ObjectHolder* o )
{
- // we delete all children and their children etc. too...
+ // we delete all tqchildren and their tqchildren etc. too...
std::vector<ObjectHolder*> os;
os.push_back( o );
delObjects( os );
@@ -621,7 +619,7 @@ bool KigPart::internalSaveAs()
{
int ret = KMessageBox::warningContinueCancel( m_widget,
i18n( "The file \"%1\" already exists. Do you wish to overwrite it?" )
- .arg( file_name ), i18n( "Overwrite File?" ), i18n("Overwrite") );
+ .tqarg( file_name ), i18n( "Overwrite File?" ), i18n("Overwrite") );
if ( ret != KMessageBox::Continue )
{
return false;
@@ -637,11 +635,7 @@ void KigPart::runMode( KigMode* m )
setMode( m );
-#if QT_VERSION >= 0x030100
(void) kapp->eventLoop()->enterLoop();
-#else
- (void) kapp->enter_loop();
-#endif
setMode( prev );
redrawScreen();
@@ -652,11 +646,7 @@ void KigPart::doneMode( KigMode* d )
assert( d == mMode );
// pretend to use this var..
(void)d;
-#if QT_VERSION >= 0x030100
kapp->eventLoop()->exitLoop();
-#else
- kapp->exit_loop();
-#endif
}
void KigPart::actionRemoved( GUIAction* a, GUIUpdateToken& t )
@@ -932,7 +922,7 @@ extern "C" int convertToNative( const KURL& url, const TQCString& outfile )
KMimeType::Ptr mimeType = KMimeType::findByPath ( file );
kdDebug() << k_funcinfo << "mimetype: " << mimeType->name() << endl;
- KigFilter* filter = KigFilters::instance()->find( mimeType->name() );
+ KigFilter* filter = KigFilters::instance()->tqfind( mimeType->name() );
if ( !filter )
{
kdError() << "The file \"" << file << "\" is of a filetype not currently supported by Kig." << endl;
@@ -952,7 +942,7 @@ extern "C" int convertToNative( const KURL& url, const TQCString& outfile )
for ( std::vector<ObjectCalcer*>::iterator i = tmp.begin(); i != tmp.end(); ++i )
( *i )->calc( *doc );
- TQString out = ( outfile == "-" ) ? TQString::null : outfile;
+ TQString out = ( outfile == "-" ) ? TQString() : outfile;
bool success = KigFilters::instance()->save( *doc, out );
if ( !success )
{