summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/document.cpp b/src/document.cpp
index cc43f00..0610af1 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -20,8 +20,8 @@
#include <kmessagebox.h>
#include <ktabwidget.h>
-Document::Document( const QString &caption, KTechlab *ktechlab, const char *name )
- : QObject( ktechlab, name ),
+Document::Document( const TQString &caption, KTechlab *ktechlab, const char *name )
+ : TQObject( ktechlab, name ),
b_modified(false),
p_ktechlab(ktechlab),
p_activeView(0l),
@@ -33,7 +33,7 @@ Document::Document( const QString &caption, KTechlab *ktechlab, const char *name
m_bDeleted(false)
{
if (p_ktechlab)
- connect( p_ktechlab, SIGNAL(configurationChanged()), this, SLOT(slotUpdateConfiguration()) );
+ connect( p_ktechlab, TQT_SIGNAL(configurationChanged()), this, TQT_SLOT(slotUpdateConfiguration()) );
}
@@ -50,27 +50,27 @@ Document::~Document()
void Document::handleNewView( View *view )
{
- if ( !view || m_viewList.contains(view) )
+ if ( !view || m_viewList.tqcontains(view) )
return;
m_viewList.append(view);
view->setDCOPID(m_nextViewID++);
view->setCaption(m_caption);
- connect( view, SIGNAL(destroyed(QObject* )), this, SLOT(slotViewDestroyed(QObject* )) );
- connect( view, SIGNAL(viewFocused(View* )), this, SLOT(slotViewFocused(View* )) );
- connect( view, SIGNAL(viewUnfocused()), this, SIGNAL(viewUnfocused()) );
+ connect( view, TQT_SIGNAL(destroyed(TQObject* )), this, TQT_SLOT(slotViewDestroyed(TQObject* )) );
+ connect( view, TQT_SIGNAL(viewFocused(View* )), this, TQT_SLOT(slotViewFocused(View* )) );
+ connect( view, TQT_SIGNAL(viewUnfocused()), this, TQT_SIGNAL(viewUnfocused()) );
view->show();
view->setFocused();
}
-void Document::slotViewDestroyed( QObject *obj )
+void Document::slotViewDestroyed( TQObject *obj )
{
- View *view = static_cast<View*>(obj);
+ View *view = static_cast<View*>(TQT_TQWIDGET(obj));
m_viewList.remove(view);
- if ( p_activeView == (QGuardedPtr<View>)view )
+ if ( p_activeView == (TQGuardedPtr<View>)view )
{
p_activeView = 0l;
emit viewUnfocused();
@@ -91,7 +91,7 @@ void Document::slotViewFocused(View *view)
}
-void Document::setCaption( const QString &caption )
+void Document::setCaption( const TQString &caption )
{
m_caption = caption;
const ViewList::iterator end = m_viewList.end();
@@ -100,17 +100,17 @@ void Document::setCaption( const QString &caption )
}
-bool Document::getURL( const QString &types )
+bool Document::getURL( const TQString &types )
{
- KURL url = KFileDialog::getSaveURL( QString::null, types, p_ktechlab, i18n("Save Location"));
+ KURL url = KFileDialog::getSaveURL( TQString(), types, p_ktechlab, i18n("Save Location"));
if ( url.isEmpty() )
return false;
- if ( QFile::exists( url.path() ) )
+ if ( TQFile::exists( url.path() ) )
{
int query = KMessageBox::warningYesNo( p_ktechlab,
- i18n( "A file named \"%1\" already exists. Are you sure you want to overwrite it?" ).arg( url.fileName() ),
+ i18n( "A file named \"%1\" already exists. Are you sure you want to overwrite it?" ).tqarg( url.fileName() ),
i18n( "Overwrite File?" ),
i18n( "Overwrite" ),
KStdGuiItem::cancel() );
@@ -129,13 +129,13 @@ bool Document::fileClose()
if ( isModified() )
{
// If the filename is empty then it must be an untitled file.
- QString name = m_url.fileName().isEmpty() ? caption() : m_url.fileName();
+ TQString name = m_url.fileName().isEmpty() ? caption() : m_url.fileName();
if ( ViewContainer * viewContainer = (activeView() ? activeView()->viewContainer() : 0l) )
p_ktechlab->tabWidget()->setCurrentPage( p_ktechlab->tabWidget()->indexOf(viewContainer) );
int choice = KMessageBox::warningYesNoCancel( p_ktechlab,
- i18n("The document \'%1\' has been modified.\nDo you want to save it?").arg(name),
+ i18n("The document \'%1\' has been modified.\nDo you want to save it?").tqarg(name),
i18n("Save Document?"),
i18n("Save"),
i18n("Discard") );
@@ -196,7 +196,7 @@ void Document::setDCOPID( unsigned id )
m_dcopID = id;
if ( m_pDocumentIface )
{
- QCString docID;
+ TQCString docID;
docID.setNum( dcopID() );
m_pDocumentIface->setObjId( "Document#" + docID );
}