summaryrefslogtreecommitdiffstats
path: root/kate/app/katesavemodifieddialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kate/app/katesavemodifieddialog.cpp')
-rw-r--r--kate/app/katesavemodifieddialog.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kate/app/katesavemodifieddialog.cpp b/kate/app/katesavemodifieddialog.cpp
index 51dc1ea61..09257300c 100644
--- a/kate/app/katesavemodifieddialog.cpp
+++ b/kate/app/katesavemodifieddialog.cpp
@@ -20,30 +20,30 @@
#include "katesavemodifieddialog.moc"
#include <klocale.h>
-#include <qlistview.h>
+#include <tqlistview.h>
#include <klistview.h>
#include <kguiitem.h>
#include <kactivelabel.h>
#include <kstdguiitem.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <kiconloader.h>
#include <kmessagebox.h>
#include <kdebug.h>
#include <kencodingfiledialog.h>
#include <ktexteditor/encodinginterface.h>
-class AbstractKateSaveModifiedDialogCheckListItem:public QCheckListItem {
+class AbstractKateSaveModifiedDialogCheckListItem:public TQCheckListItem {
public:
- AbstractKateSaveModifiedDialogCheckListItem(QListViewItem *parent,const QString& title, const QString& url):QCheckListItem(parent,title,QCheckListItem::CheckBox) {
+ AbstractKateSaveModifiedDialogCheckListItem(TQListViewItem *parent,const TQString& title, const TQString& url):TQCheckListItem(parent,title,TQCheckListItem::CheckBox) {
setText(1,url);
setOn(true);
setState(InitialState);
}
virtual ~AbstractKateSaveModifiedDialogCheckListItem() {
}
- virtual bool synchronousSave(QWidget *dialogParent)=0;
+ virtual bool synchronousSave(TQWidget *dialogParent)=0;
enum STATE{InitialState,SaveOKState,SaveFailedState};
STATE state() const { return m_state;}
void setState(enum STATE state) {
@@ -51,7 +51,7 @@ public:
KIconLoader *loader = KGlobal::instance()->iconLoader();
switch (state) {
case InitialState:
- setPixmap(0,QPixmap());
+ setPixmap(0,TQPixmap());
break;
case SaveOKState:
setPixmap(0,loader->loadIcon("ok",KIcon::NoGroup,height()));
@@ -67,15 +67,15 @@ private:
class KateSaveModifiedDocumentCheckListItem:public AbstractKateSaveModifiedDialogCheckListItem {
public:
- KateSaveModifiedDocumentCheckListItem(QListViewItem *parent,Kate::Document *document):AbstractKateSaveModifiedDialogCheckListItem(parent,document->docName(),document->url().prettyURL()){
+ KateSaveModifiedDocumentCheckListItem(TQListViewItem *parent,Kate::Document *document):AbstractKateSaveModifiedDialogCheckListItem(parent,document->docName(),document->url().prettyURL()){
m_document=document;
}
virtual ~KateSaveModifiedDocumentCheckListItem() {
}
- virtual bool synchronousSave(QWidget *dialogParent) {
+ virtual bool synchronousSave(TQWidget *dialogParent) {
if (m_document->url().isEmpty() ) {
KEncodingFileDialog::Result r=KEncodingFileDialog::getSaveURLAndEncoding(
- KTextEditor::encodingInterface(m_document)->encoding(),QString::null,QString::null,dialogParent,i18n("Save As (%1)").arg(m_document->docName()));
+ KTextEditor::encodingInterface(m_document)->encoding(),TQString::null,TQString::null,dialogParent,i18n("Save As (%1)").arg(m_document->docName()));
m_document->setEncoding( r.encoding );
if (!r.URLs.isEmpty()) {
@@ -125,7 +125,7 @@ private:
Kate::Document *m_document;
};
-KateSaveModifiedDialog::KateSaveModifiedDialog(QWidget *parent, QPtrList<Kate::Document> documents):
+KateSaveModifiedDialog::KateSaveModifiedDialog(TQWidget *parent, TQPtrList<Kate::Document> documents):
KDialogBase( parent, "KateSaveModifiedDialog", true, i18n("Save Documents"), Yes | No | Cancel) {
KGuiItem saveItem=KStdGuiItem::save();
@@ -138,18 +138,18 @@ KateSaveModifiedDialog::KateSaveModifiedDialog(QWidget *parent, QPtrList<Kate::D
cancelItem.setText(i18n("&Abort Closing"));
setButtonGuiItem(KDialogBase::Cancel,cancelItem);
- QVBox *box=makeVBoxMainWidget();
+ TQVBox *box=makeVBoxMainWidget();
new KActiveLabel(i18n("<qt>The following documents have been modified. Do you want to save them before closing?</qt>"),box);
m_list=new KListView(box);
m_list->addColumn(i18n("Title"));
m_list->addColumn(i18n("Location"));
m_list->setRootIsDecorated(true);
- m_list->setResizeMode(QListView::LastColumn);
+ m_list->setResizeMode(TQListView::LastColumn);
if (0) {
- m_projectRoot=new QListViewItem(m_list,i18n("Projects"));
+ m_projectRoot=new TQListViewItem(m_list,i18n("Projects"));
} else m_projectRoot=0;
if (documents.count()>0) {
- m_documentRoot=new QListViewItem(m_list,i18n("Documents"));
+ m_documentRoot=new TQListViewItem(m_list,i18n("Documents"));
const uint docCnt=documents.count();
for (uint i=0;i<docCnt;i++) {
new KateSaveModifiedDocumentCheckListItem(m_documentRoot,documents.at(i));
@@ -157,11 +157,11 @@ KateSaveModifiedDialog::KateSaveModifiedDialog(QWidget *parent, QPtrList<Kate::D
m_documentRoot->setOpen(true);
} else m_documentRoot=0;
//FIXME - Is this the best way?
- connect(m_list, SIGNAL(clicked(QListViewItem *)), SLOT(slotItemSelected()));
- connect(m_list, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotItemSelected()));
- connect(m_list, SIGNAL(spacePressed(QListViewItem *)), SLOT(slotItemSelected()));
+ connect(m_list, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(slotItemSelected()));
+ connect(m_list, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotItemSelected()));
+ connect(m_list, TQT_SIGNAL(spacePressed(TQListViewItem *)), TQT_SLOT(slotItemSelected()));
if(documents.count()>3) { //For 3 or less, it would be quicker just to tick or untick them yourself, so don't clutter the gui.
- connect(new QPushButton(i18n("Se&lect All"),box),SIGNAL(clicked()),this,SLOT(slotSelectAll()));
+ connect(new TQPushButton(i18n("Se&lect All"),box),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotSelectAll()));
}
}
@@ -171,8 +171,8 @@ KateSaveModifiedDialog::~KateSaveModifiedDialog() {
void KateSaveModifiedDialog::slotItemSelected() {
kdDebug(13001) << "slotItemSelected()" << endl;
- for(QListViewItem *it=m_documentRoot->firstChild();it;it=it->nextSibling()) {
- if(((QCheckListItem*)it)->isOn()) {
+ for(TQListViewItem *it=m_documentRoot->firstChild();it;it=it->nextSibling()) {
+ if(((TQCheckListItem*)it)->isOn()) {
enableButton(KDialogBase::Yes, true);
return;
}
@@ -180,10 +180,10 @@ void KateSaveModifiedDialog::slotItemSelected() {
enableButton(KDialogBase::Yes, false);
}
-static void selectItems(QListViewItem *root) {
+static void selectItems(TQListViewItem *root) {
if (!root) return;
- for (QListViewItem *it=root->firstChild();it;it=it->nextSibling()) {
- ((QCheckListItem*)it)->setOn(true);
+ for (TQListViewItem *it=root->firstChild();it;it=it->nextSibling()) {
+ ((TQCheckListItem*)it)->setOn(true);
}
}
@@ -195,16 +195,16 @@ void KateSaveModifiedDialog::slotSelectAll() {
void KateSaveModifiedDialog::slotUser2() {
kdDebug(13001)<<"KateSaveModifiedDialog::slotYes()"<<endl;
- if (doSave(m_documentRoot)) done(QDialog::Accepted);
+ if (doSave(m_documentRoot)) done(TQDialog::Accepted);
}
void KateSaveModifiedDialog::slotUser1() {
- done(QDialog::Accepted);
+ done(TQDialog::Accepted);
}
-bool KateSaveModifiedDialog::doSave(QListViewItem *root) {
+bool KateSaveModifiedDialog::doSave(TQListViewItem *root) {
if (root) {
- for (QListViewItem *it=root->firstChild();it;it=it->nextSibling()) {
+ for (TQListViewItem *it=root->firstChild();it;it=it->nextSibling()) {
AbstractKateSaveModifiedDialogCheckListItem *cit= (AbstractKateSaveModifiedDialogCheckListItem*)it;
if (cit->isOn() && (cit->state()!=AbstractKateSaveModifiedDialogCheckListItem::SaveOKState)) {
if (!cit->synchronousSave(this /*perhaps that should be the kate mainwindow*/)) {
@@ -220,7 +220,7 @@ bool KateSaveModifiedDialog::doSave(QListViewItem *root) {
return true;
}
-bool KateSaveModifiedDialog::queryClose(QWidget *parent,QPtrList<Kate::Document> documents) {
+bool KateSaveModifiedDialog::queryClose(TQWidget *parent,TQPtrList<Kate::Document> documents) {
KateSaveModifiedDialog d(parent,documents);
- return (d.exec()!=QDialog::Rejected);
+ return (d.exec()!=TQDialog::Rejected);
}