diff options
Diffstat (limited to 'kcontrol/samba')
-rw-r--r-- | kcontrol/samba/kcmsambaimports.cpp | 18 | ||||
-rw-r--r-- | kcontrol/samba/kcmsambaimports.h | 10 | ||||
-rw-r--r-- | kcontrol/samba/kcmsambalog.cpp | 42 | ||||
-rw-r--r-- | kcontrol/samba/kcmsambalog.h | 28 | ||||
-rw-r--r-- | kcontrol/samba/kcmsambastatistics.cpp | 114 | ||||
-rw-r--r-- | kcontrol/samba/kcmsambastatistics.h | 52 | ||||
-rw-r--r-- | kcontrol/samba/ksmbstatus.cpp | 42 | ||||
-rw-r--r-- | kcontrol/samba/ksmbstatus.h | 20 | ||||
-rw-r--r-- | kcontrol/samba/main.cpp | 16 |
9 files changed, 171 insertions, 171 deletions
diff --git a/kcontrol/samba/kcmsambaimports.cpp b/kcontrol/samba/kcmsambaimports.cpp index a88e2448f..fd31f7800 100644 --- a/kcontrol/samba/kcmsambaimports.cpp +++ b/kcontrol/samba/kcmsambaimports.cpp @@ -23,20 +23,20 @@ #include "kcmsambaimports.h" #include "kcmsambaimports.moc" -#include <qlayout.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> #include <klocale.h> #include <kdialog.h> #include <stdio.h> -ImportsView::ImportsView(QWidget * parent, KConfig *config, const char * name ) - : QWidget (parent, name) +ImportsView::ImportsView(TQWidget * parent, KConfig *config, const char * name ) + : TQWidget (parent, name) ,configFile(config) ,list(this) { - QBoxLayout *topLayout = new QVBoxLayout(this, KDialog::marginHint(), + TQBoxLayout *topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); topLayout->setAutoAdd(true); @@ -47,7 +47,7 @@ ImportsView::ImportsView(QWidget * parent, KConfig *config, const char * name ) list.addColumn(i18n("Resource"), 200); list.addColumn(i18n("Mounted Under"), 190); - QWhatsThis::add( this, i18n("This list shows the Samba and NFS shared" + TQWhatsThis::add( this, i18n("This list shows the Samba and NFS shared" " resources mounted on your system from other hosts. The \"Type\"" " column tells you whether the mounted resource is a Samba or an NFS" " type of resource. The \"Resource\" column shows the descriptive name" @@ -56,7 +56,7 @@ ImportsView::ImportsView(QWidget * parent, KConfig *config, const char * name ) " resource is mounted.") ); timer.start(10000); - QObject::connect(&timer, SIGNAL(timeout()), this, SLOT(updateList())); + TQObject::connect(&timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateList())); updateList(); } @@ -65,7 +65,7 @@ void ImportsView::updateList() list.clear(); char *e; char buf[250]; - QCString s(""),strSource, strMount, strType; + TQCString s(""),strSource, strMount, strType; FILE *f=popen("mount","r"); if (f==0) return; do @@ -85,7 +85,7 @@ void ImportsView::updateList() int pos(strMount.find(" type ")); if (pos==-1) pos=strMount.find(" read/"); strMount=strMount.left(pos); - new QListViewItem(&list,strType,strSource,strMount); + new TQListViewItem(&list,strType,strSource,strMount); }; }; } diff --git a/kcontrol/samba/kcmsambaimports.h b/kcontrol/samba/kcmsambaimports.h index 5cd1c5e92..56ddb5f36 100644 --- a/kcontrol/samba/kcmsambaimports.h +++ b/kcontrol/samba/kcmsambaimports.h @@ -24,22 +24,22 @@ #ifndef kcmsambaimports_h_included #define kcmsambaimports_h_included -#include <qtimer.h> -#include <qlistview.h> +#include <tqtimer.h> +#include <tqlistview.h> #include <kconfig.h> class ImportsView: public QWidget { Q_OBJECT public: - ImportsView(QWidget *parent, KConfig *config=0, const char * name=0); + ImportsView(TQWidget *parent, KConfig *config=0, const char * name=0); virtual ~ImportsView() {}; void saveSettings() {}; void loadSettings() {}; private: KConfig *configFile; - QListView list; - QTimer timer; + TQListView list; + TQTimer timer; private slots: void updateList(); }; diff --git a/kcontrol/samba/kcmsambalog.cpp b/kcontrol/samba/kcmsambalog.cpp index c4f01b464..224bc6fa2 100644 --- a/kcontrol/samba/kcmsambalog.cpp +++ b/kcontrol/samba/kcmsambalog.cpp @@ -21,9 +21,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qfile.h> -#include <qlayout.h> -#include <qwhatsthis.h> +#include <tqfile.h> +#include <tqlayout.h> +#include <tqwhatsthis.h> #include <kmessagebox.h> #include <kdialog.h> @@ -34,8 +34,8 @@ #define LOG_SCREEN_XY_OFFSET 10 -LogView::LogView(QWidget *parent,KConfig *config, const char *name) -: QWidget (parent, name) +LogView::LogView(TQWidget *parent,KConfig *config, const char *name) +: TQWidget (parent, name) ,configFile(config) ,filesCount(0) ,connectionsCount(0) @@ -48,50 +48,50 @@ LogView::LogView(QWidget *parent,KConfig *config, const char *name) ,showFileClose(i18n("Show closed files"),this) ,updateButton(i18n("&Update"),this) { - QVBoxLayout *mainLayout=new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *mainLayout=new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - QHBoxLayout *leLayout=new QHBoxLayout(mainLayout); + TQHBoxLayout *leLayout=new TQHBoxLayout(mainLayout); leLayout->addWidget(&label); leLayout->addWidget(&logFileName,1); mainLayout->addWidget(&viewHistory,1); - QGridLayout *subLayout=new QGridLayout(mainLayout,2,2); + TQGridLayout *subLayout=new TQGridLayout(mainLayout,2,2); subLayout->addWidget(&showConnOpen,0,0); subLayout->addWidget(&showConnClose,1,0); subLayout->addWidget(&showFileOpen,0,1); subLayout->addWidget(&showFileClose,1,1); mainLayout->addWidget(&updateButton,0,Qt::AlignLeft); - QWhatsThis::add( &logFileName, i18n("This page presents the contents of" + TQWhatsThis::add( &logFileName, i18n("This page presents the contents of" " your samba log file in a friendly layout. Check that the correct log" " file for your computer is listed here. If you need to, correct the name" " or location of the log file, and then click the \"Update\" button.") ); - QWhatsThis::add( &showConnOpen, i18n("Check this option if you want to" + TQWhatsThis::add( &showConnOpen, i18n("Check this option if you want to" " view the details for connections opened to your computer.") ); - QWhatsThis::add( &showConnClose, i18n("Check this option if you want to" + TQWhatsThis::add( &showConnClose, i18n("Check this option if you want to" " view the events when connections to your computer were closed.") ); - QWhatsThis::add( &showFileOpen, i18n("Check this option if you want to" + TQWhatsThis::add( &showFileOpen, i18n("Check this option if you want to" " see the files which were opened on your computer by remote users." " Note that file open/close events are not logged unless the samba" " log level is set to at least 2 (you cannot set the log level" " using this module).") ); - QWhatsThis::add( &showFileClose, i18n("Check this option if you want to" + TQWhatsThis::add( &showFileClose, i18n("Check this option if you want to" " see the events when files opened by remote users were closed." " Note that file open/close events are not logged unless the samba" " log level is set to at least 2 (you cannot set the log level" " using this module).") ); - QWhatsThis::add( &updateButton, i18n("Click here to refresh the information" + TQWhatsThis::add( &updateButton, i18n("Click here to refresh the information" " on this page. The log file (shown above) will be read to obtain the" " events logged by samba.") ); logFileName.setURL("/var/log/samba.log"); viewHistory.setAllColumnsShowFocus(TRUE); - viewHistory.setFocusPolicy(QWidget::ClickFocus); + viewHistory.setFocusPolicy(TQWidget::ClickFocus); viewHistory.setShowSortIndicator(true); viewHistory.addColumn(i18n("Date & Time"),130); @@ -99,7 +99,7 @@ LogView::LogView(QWidget *parent,KConfig *config, const char *name) viewHistory.addColumn(i18n("Service/File"),210); viewHistory.addColumn(i18n("Host/User"),150); - QWhatsThis::add( &viewHistory, i18n("This list shows details of the events" + TQWhatsThis::add( &viewHistory, i18n("This list shows details of the events" " logged by samba. Note that events at the file level are not logged" " unless you have configured the log level for samba to 2 or greater.<p>" " As with many other lists in KDE, you can click on a column heading" @@ -113,7 +113,7 @@ LogView::LogView(QWidget *parent,KConfig *config, const char *name) showFileOpen.setChecked(FALSE); showFileClose.setChecked(FALSE); - connect(&updateButton,SIGNAL(clicked()),this,SLOT(updateList())); + connect(&updateButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(updateList())); emit contentsChanged(&viewHistory,0,0); label.setMinimumSize(label.sizeHint()); @@ -158,10 +158,10 @@ void LogView::saveSettings() //caution ! high optimized code :-) void LogView::updateList() { - QFile logFile(logFileName.url()); + TQFile logFile(logFileName.url()); if (logFile.open(IO_ReadOnly)) { - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); viewHistory.clear(); filesCount=0; connectionsCount=0; @@ -242,11 +242,11 @@ void LogView::updateList() }; logFile.close(); emit contentsChanged(&viewHistory, filesCount, connectionsCount); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } else { - QString tmp = i18n("Could not open file %1").arg(logFileName.url()); + TQString tmp = i18n("Could not open file %1").arg(logFileName.url()); KMessageBox::error(this,tmp); }; } diff --git a/kcontrol/samba/kcmsambalog.h b/kcontrol/samba/kcmsambalog.h index 03e22f872..d0b427d48 100644 --- a/kcontrol/samba/kcmsambalog.h +++ b/kcontrol/samba/kcmsambalog.h @@ -23,12 +23,12 @@ #ifndef kcmsambalog_h_included #define kcmsambalog_h_included -#include <qlabel.h> -#include <qcstring.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qlistview.h> -#include <qevent.h> +#include <tqlabel.h> +#include <tqcstring.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqlistview.h> +#include <tqevent.h> #include <kconfig.h> #include <kurlrequester.h> @@ -39,7 +39,7 @@ class LogView: public QWidget { Q_OBJECT public: - LogView(QWidget *parent=0, KConfig *config=0, const char *name=0); + LogView(TQWidget *parent=0, KConfig *config=0, const char *name=0); virtual ~LogView() {}; void saveSettings(); void loadSettings(); @@ -47,26 +47,26 @@ class LogView: public QWidget KConfig *configFile; int filesCount, connectionsCount; KURLRequester logFileName; - QLabel label; - QListView viewHistory; - QCheckBox showConnOpen, showConnClose, showFileOpen, showFileClose; - QPushButton updateButton; + TQLabel label; + TQListView viewHistory; + TQCheckBox showConnOpen, showConnClose, showFileOpen, showFileClose; + TQPushButton updateButton; private slots: void updateList(); signals: - void contentsChanged(QListView* list, int nrOfFiles, int nrOfConnections); + void contentsChanged(TQListView* list, int nrOfFiles, int nrOfConnections); }; class QListViewItemX:public QListViewItem { public: //a faster constructor saves a lot time - QListViewItemX( QListView * parent, + QListViewItemX( TQListView * parent, const char *c0, const char *c1 = 0, const char *c2 = 0, const char *c3 = 0, const char *c4 = 0, const char *c5 = 0, const char *c6 = 0, const char *c7 = 0 ) - :QListViewItem(parent) + :TQListViewItem(parent) { setText( 0, c0 ); setText( 1, c1 ); diff --git a/kcontrol/samba/kcmsambastatistics.cpp b/kcontrol/samba/kcmsambastatistics.cpp index ebdd1c092..4da2045cb 100644 --- a/kcontrol/samba/kcmsambastatistics.cpp +++ b/kcontrol/samba/kcmsambastatistics.cpp @@ -23,44 +23,44 @@ #include "kcmsambastatistics.h" #include "kcmsambastatistics.moc" -#include <qlayout.h> -#include <qlistview.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qregexp.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqregexp.h> #include <kglobal.h> #include <klocale.h> #include <kdebug.h> #include <kdialog.h> -StatisticsView::StatisticsView(QWidget *parent,KConfig *config, const char *name) - :QWidget (parent, name) +StatisticsView::StatisticsView(TQWidget *parent,KConfig *config, const char *name) + :TQWidget (parent, name) ,configFile(config) ,dataList(0) ,connectionsCount(0) ,filesCount(0) ,calcCount(0) { - viewStatistics = new QListView( this ); - connectionsL = new QLabel( i18n( "Connections: 0" ), this ); - filesL = new QLabel( i18n( "File accesses: 0" ), this ); - eventCb = new QComboBox( false, this ); - eventL = new QLabel( eventCb, i18n( "Event: " ), this ); - serviceLe = new QLineEdit( this ); - serviceL = new QLabel( serviceLe, i18n( "Service/File:" ), this ); - hostLe = new QLineEdit( this ); - hostL = new QLabel( hostLe, i18n( "Host/User:" ), this ); - calcButton = new QPushButton( i18n( "&Search" ), this ); - clearButton = new QPushButton( i18n( "Clear Results" ), this ); - expandedInfoCb = new QCheckBox( i18n( "Show expanded service info" ), this ); - expandedUserCb = new QCheckBox( i18n( "Show expanded host info" ), this ); + viewStatistics = new TQListView( this ); + connectionsL = new TQLabel( i18n( "Connections: 0" ), this ); + filesL = new TQLabel( i18n( "File accesses: 0" ), this ); + eventCb = new TQComboBox( false, this ); + eventL = new TQLabel( eventCb, i18n( "Event: " ), this ); + serviceLe = new TQLineEdit( this ); + serviceL = new TQLabel( serviceLe, i18n( "Service/File:" ), this ); + hostLe = new TQLineEdit( this ); + hostL = new TQLabel( hostLe, i18n( "Host/User:" ), this ); + calcButton = new TQPushButton( i18n( "&Search" ), this ); + clearButton = new TQPushButton( i18n( "Clear Results" ), this ); + expandedInfoCb = new TQCheckBox( i18n( "Show expanded service info" ), this ); + expandedUserCb = new TQCheckBox( i18n( "Show expanded host info" ), this ); viewStatistics->setAllColumnsShowFocus(TRUE); - viewStatistics->setFocusPolicy(QWidget::ClickFocus); + viewStatistics->setFocusPolicy(TQWidget::ClickFocus); viewStatistics->setShowSortIndicator(true); viewStatistics->addColumn(i18n("Nr"),30); @@ -93,14 +93,14 @@ StatisticsView::StatisticsView(QWidget *parent,KConfig *config, const char *name expandedInfoCb->setMinimumSize(expandedInfoCb->sizeHint()); expandedUserCb->setMinimumSize(expandedUserCb->sizeHint()); - QVBoxLayout *topLayout=new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *topLayout=new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); topLayout->addWidget(viewStatistics,1); - QGridLayout *subLayout=new QGridLayout(topLayout,4,3); + TQGridLayout *subLayout=new TQGridLayout(topLayout,4,3); subLayout->setColStretch(1,1); subLayout->setColStretch(2,1); - QHBoxLayout *twoButtonsLayout=new QHBoxLayout; + TQHBoxLayout *twoButtonsLayout=new QHBoxLayout; twoButtonsLayout->addWidget(calcButton,1); twoButtonsLayout->addWidget(clearButton,1); @@ -116,12 +116,12 @@ StatisticsView::StatisticsView(QWidget *parent,KConfig *config, const char *name subLayout->addWidget(expandedInfoCb,3,1); subLayout->addWidget(expandedUserCb,3,2); - connect(clearButton,SIGNAL(clicked()),this,SLOT(clearStatistics())); - connect(calcButton,SIGNAL(clicked()),this,SLOT(calculate())); + connect(clearButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(clearStatistics())); + connect(calcButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(calculate())); setListInfo(0,0,0); } -void StatisticsView::setListInfo(QListView *list, int nrOfFiles, int nrOfConnections) +void StatisticsView::setListInfo(TQListView *list, int nrOfFiles, int nrOfConnections) { dataList=list; filesCount=nrOfFiles; @@ -134,7 +134,7 @@ void StatisticsView::setListInfo(QListView *list, int nrOfFiles, int nrOfConnect void StatisticsView::calculate() { if (dataList==0) return; - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); int connCount(0); if (eventCb->currentText()==i18n("Connection")) connCount=1; @@ -142,16 +142,16 @@ void StatisticsView::calculate() if ((expandedInfoCb->isChecked()) || (expandedUserCb->isChecked())) { SambaLog sLog; - QRegExp rService(serviceLe->text(),FALSE,TRUE); - QRegExp rHost(hostLe->text(),FALSE,TRUE); - QString item2, item3; - QListViewItem* item=dataList->firstChild(); + TQRegExp rService(serviceLe->text(),FALSE,TRUE); + TQRegExp rHost(hostLe->text(),FALSE,TRUE); + TQString item2, item3; + TQListViewItem* item=dataList->firstChild(); while (item!=0) { if (connCount) { - if ((QString(item->text(1)).contains(i18n("CONNECTION OPENED"))) - && (QString(item->text(2)).contains(rService)) && (QString(item->text(3)).contains(rHost))) + if ((TQString(item->text(1)).contains(i18n("CONNECTION OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) { if (expandedInfoCb->isChecked()) item2=item->text(2); else item2=serviceLe->text(); @@ -163,8 +163,8 @@ void StatisticsView::calculate() } else { - if ((QString(item->text(1)).contains(i18n("FILE OPENED"))) - && (QString(item->text(2)).contains(rService)) && (QString(item->text(3)).contains(rHost))) + if ((TQString(item->text(1)).contains(i18n("FILE OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) { if (expandedInfoCb->isChecked()) item2=item->text(2); else item2=serviceLe->text(); @@ -181,11 +181,11 @@ void StatisticsView::calculate() for (SmallLogItem *tmpStr=tmpItem->accessed.first();tmpStr!=0;tmpStr=tmpItem->accessed.next()) { calcCount++; - QString number(""); + TQString number(""); number.sprintf("%6d",calcCount); - QString hits(""); + TQString hits(""); hits.sprintf("%7d",tmpStr->count); - new QListViewItem(viewStatistics,number,eventCb->currentText(),tmpItem->name,tmpStr->name,hits); + new TQListViewItem(viewStatistics,number,eventCb->currentText(),tmpItem->name,tmpStr->name,hits); }; }; } @@ -194,32 +194,32 @@ void StatisticsView::calculate() { calcCount++; int count(0); - QRegExp rService(serviceLe->text(),FALSE,TRUE); - QRegExp rHost(hostLe->text(),FALSE,TRUE); - QListViewItem* item=dataList->firstChild(); + TQRegExp rService(serviceLe->text(),FALSE,TRUE); + TQRegExp rHost(hostLe->text(),FALSE,TRUE); + TQListViewItem* item=dataList->firstChild(); while (item!=0) { if (connCount) { - if ((QString(item->text(1)).contains(i18n("CONNECTION OPENED"))) - && (QString(item->text(2)).contains(rService)) && (QString(item->text(3)).contains(rHost))) + if ((TQString(item->text(1)).contains(i18n("CONNECTION OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) count++; } else { - if ((QString(item->text(1)).contains(i18n("FILE OPENED"))) - && (QString(item->text(2)).contains(rService)) && (QString(item->text(3)).contains(rHost))) + if ((TQString(item->text(1)).contains(i18n("FILE OPENED"))) + && (TQString(item->text(2)).contains(rService)) && (TQString(item->text(3)).contains(rHost))) count++; }; item=item->nextSibling(); }; - QString number(""); + TQString number(""); number.sprintf("%6d",calcCount); - QString hits(""); + TQString hits(""); hits.sprintf("%7d",count); - new QListViewItem(viewStatistics,number,eventCb->currentText(),serviceLe->text(),hostLe->text(),hits); + new TQListViewItem(viewStatistics,number,eventCb->currentText(),serviceLe->text(),hostLe->text(),hits); }; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void StatisticsView::clearStatistics() @@ -240,7 +240,7 @@ void SambaLog::printItems() kdDebug() << "------ end of printing ------" << endl << endl; } -LogItem* SambaLog::itemInList(QString name) +LogItem* SambaLog::itemInList(TQString name) { LogItem* tmpItem(items.first()); LogItem* foundItem(0); @@ -252,7 +252,7 @@ LogItem* SambaLog::itemInList(QString name) return foundItem; } -void SambaLog::addItem(QString share, QString user) +void SambaLog::addItem(TQString share, TQString user) { //cout<<" adding connection: -"<<share<<"- -"<<user<<"-"<<endl; LogItem* tmp(itemInList(share)); @@ -267,7 +267,7 @@ void SambaLog::addItem(QString share, QString user) }; } -SmallLogItem* LogItem::itemInList(QString name) +SmallLogItem* LogItem::itemInList(TQString name) { SmallLogItem* tmpItem(accessed.first()); SmallLogItem* foundItem(0); @@ -279,7 +279,7 @@ SmallLogItem* LogItem::itemInList(QString name) return foundItem; } -void LogItem::addItem (QString host) +void LogItem::addItem (TQString host) { SmallLogItem* tmp(itemInList(host)); if (tmp!=0) diff --git a/kcontrol/samba/kcmsambastatistics.h b/kcontrol/samba/kcmsambastatistics.h index 66a9474ab..958e45a55 100644 --- a/kcontrol/samba/kcmsambastatistics.h +++ b/kcontrol/samba/kcmsambastatistics.h @@ -23,8 +23,8 @@ #ifndef kcmsambastatistics_h_included #define kcmsambastatistics_h_included -#include <qwidget.h> -#include <qptrlist.h> +#include <tqwidget.h> +#include <tqptrlist.h> class QListView; class QLabel; @@ -39,8 +39,8 @@ class SmallLogItem { public: SmallLogItem():name(""),count(0){}; - SmallLogItem(QString n):name(n),count(1){}; - QString name; + SmallLogItem(TQString n):name(n),count(1){}; + TQString name; int count; }; @@ -48,17 +48,17 @@ class LogItem { public: LogItem():name(""), accessed(),count(0) {}; - LogItem(QString n, QString a):name(n), accessed(), count(1) + LogItem(TQString n, TQString a):name(n), accessed(), count(1) { accessed.setAutoDelete(TRUE); accessed.append(new SmallLogItem(a)); }; - QString name; - //QStrList accessedBy; - QPtrList<SmallLogItem> accessed; + TQString name; + //TQStrList accessedBy; + TQPtrList<SmallLogItem> accessed; int count; - SmallLogItem* itemInList(QString name); - void addItem (QString host); + SmallLogItem* itemInList(TQString name); + void addItem (TQString host); }; class SambaLog @@ -68,36 +68,36 @@ class SambaLog { items.setAutoDelete(TRUE); }; - QPtrList<LogItem> items; - void addItem (QString share, QString host); + TQPtrList<LogItem> items; + void addItem (TQString share, TQString host); void printItems(); private: - LogItem* itemInList(QString name); + LogItem* itemInList(TQString name); }; class StatisticsView: public QWidget { Q_OBJECT public: - StatisticsView(QWidget *parent=0, KConfig *config=0, const char *name=0); + StatisticsView(TQWidget *parent=0, KConfig *config=0, const char *name=0); virtual ~StatisticsView() {}; void saveSettings() {}; void loadSettings() {}; public slots: - void setListInfo(QListView *list, int nrOfFiles, int nrOfConnections); + void setListInfo(TQListView *list, int nrOfFiles, int nrOfConnections); private: KConfig *configFile; - QListView *dataList; - QListView* viewStatistics; - QLabel* connectionsL, *filesL; - QComboBox* eventCb; - QLabel* eventL; - QLineEdit* serviceLe; - QLabel* serviceL; - QLineEdit* hostLe; - QLabel* hostL; - QPushButton* calcButton, *clearButton; - QCheckBox* expandedInfoCb, *expandedUserCb; + TQListView *dataList; + TQListView* viewStatistics; + TQLabel* connectionsL, *filesL; + TQComboBox* eventCb; + TQLabel* eventL; + TQLineEdit* serviceLe; + TQLabel* serviceL; + TQLineEdit* hostLe; + TQLabel* hostL; + TQPushButton* calcButton, *clearButton; + TQCheckBox* expandedInfoCb, *expandedUserCb; int connectionsCount, filesCount, calcCount; private slots: void clearStatistics(); diff --git a/kcontrol/samba/ksmbstatus.cpp b/kcontrol/samba/ksmbstatus.cpp index b5bc6599f..c94bc5129 100644 --- a/kcontrol/samba/ksmbstatus.cpp +++ b/kcontrol/samba/ksmbstatus.cpp @@ -22,7 +22,7 @@ #include <string.h> #include <time.h> -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kdialog.h> @@ -32,10 +32,10 @@ #define Before(ttf,in) in.left(in.find(ttf)) -#define After(ttf,in) (in.contains(ttf)?QString(in.mid(in.find(ttf)+QString(ttf).length())):QString("")) +#define After(ttf,in) (in.contains(ttf)?TQString(in.mid(in.find(ttf)+TQString(ttf).length())):TQString("")) -NetMon::NetMon( QWidget * parent, KConfig *config, const char * name ) - : QWidget(parent, name) +NetMon::NetMon( TQWidget * parent, KConfig *config, const char * name ) + : TQWidget(parent, name) ,configFile(config) ,showmountProc(0) ,strShare("") @@ -49,12 +49,12 @@ NetMon::NetMon( QWidget * parent, KConfig *config, const char * name ) ,iMachine(0) ,iPid(0) { - QBoxLayout *topLayout = new QVBoxLayout(this, KDialog::marginHint(), + TQBoxLayout *topLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); topLayout->setAutoAdd(true); - list=new QListView(this,"Hello"); - version=new QLabel(this); + list=new TQListView(this,"Hello"); + version=new TQLabel(this); list->setAllColumnsShowFocus(true); list->setMinimumSize(425,200); @@ -68,22 +68,22 @@ NetMon::NetMon( QWidget * parent, KConfig *config, const char * name ) list->addColumn(i18n("PID")); list->addColumn(i18n("Open Files")); - timer = new QTimer(this); + timer = new TQTimer(this); timer->start(15000); - QObject::connect(timer, SIGNAL(timeout()), this, SLOT(update())); + TQObject::connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(update())); update(); } void NetMon::processNFSLine(char *bufline, int) { - QCString line(bufline); + TQCString line(bufline); if (line.contains(":/")) - new QListViewItem(list,"NFS",After(":",line),Before(":/",line)); + new TQListViewItem(list,"NFS",After(":",line),Before(":/",line)); } void NetMon::processSambaLine(char *bufline, int) { - QCString line(bufline); + TQCString line(bufline); rownumber++; if (rownumber == 2) version->setText(bufline); // second line = samba version @@ -107,7 +107,7 @@ void NetMon::processSambaLine(char *bufline, int) line=line.mid(iMachine,line.length()); strMachine=line; - new QListViewItem(list,"SMB",strShare,strMachine, strUser,strGroup,strPid/*,strSince*/); + new TQListViewItem(list,"SMB",strShare,strMachine, strUser,strGroup,strPid/*,strSince*/); } else if (readingpart==connexions) readingpart=locked_files; @@ -167,7 +167,7 @@ void NetMon::update() list->clear(); /* Re-read the Contents ... */ - QString path(::getenv("PATH")); + TQString path(::getenv("PATH")); path += "/bin:/sbin:/usr/bin:/usr/sbin"; rownumber=0; @@ -175,8 +175,8 @@ void NetMon::update() nrpid=0; process->setEnvironment("PATH", path); connect(process, - SIGNAL(receivedStdout(KProcess *, char *, int)), - SLOT(slotReceivedData(KProcess *, char *, int))); + TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + TQT_SLOT(slotReceivedData(KProcess *, char *, int))); *process << "smbstatus"; if (!process->start(KProcess::Block,KProcess::Stdout)) version->setText(i18n("Error: Unable to run smbstatus")); @@ -185,11 +185,11 @@ void NetMon::update() else { // ok -> count the number of locked files for each pid - for (QListViewItem *row=list->firstChild();row!=0;row=row->itemBelow()) + for (TQListViewItem *row=list->firstChild();row!=0;row=row->itemBelow()) { // cerr<<"NetMon::update: this should be the pid: "<<row->text(5)<<endl; int pid=row->text(5).toInt(); - row->setText(6,QString("%1").arg((lo)[pid])); + row->setText(6,TQString("%1").arg((lo)[pid])); } } delete process; @@ -200,12 +200,12 @@ void NetMon::update() showmountProc=new KProcess(); showmountProc->setEnvironment("PATH", path); *showmountProc<<"showmount"<<"-a"<<"localhost"; - connect(showmountProc,SIGNAL(receivedStdout(KProcess *, char *, int)),SLOT(slotReceivedData(KProcess *, char *, int))); + connect(showmountProc,TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),TQT_SLOT(slotReceivedData(KProcess *, char *, int))); //without this timer showmount hangs up to 5 minutes //if the portmapper daemon isn't running - QTimer::singleShot(5000,this,SLOT(killShowmount())); + TQTimer::singleShot(5000,this,TQT_SLOT(killShowmount())); //kdDebug()<<"starting kill timer with 5 seconds"<<endl; - connect(showmountProc,SIGNAL(processExited(KProcess*)),this,SLOT(killShowmount())); + connect(showmountProc,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(killShowmount())); if (!showmountProc->start(KProcess::NotifyOnExit,KProcess::Stdout)) // run showmount { delete showmountProc; diff --git a/kcontrol/samba/ksmbstatus.h b/kcontrol/samba/ksmbstatus.h index 9d60e30c2..4f7185fa4 100644 --- a/kcontrol/samba/ksmbstatus.h +++ b/kcontrol/samba/ksmbstatus.h @@ -19,11 +19,11 @@ #ifndef ksmbstatus_h_included #define ksmbstatus_h_included -#include <qtimer.h> -#include <qlabel.h> +#include <tqtimer.h> +#include <tqlabel.h> #include <kprocess.h> -#include <qcstring.h> -#include <qlistview.h> +#include <tqcstring.h> +#include <tqlistview.h> #include <kconfig.h> #define SCREEN_XY_OFFSET 20 @@ -36,16 +36,16 @@ class NetMon : public QWidget { Q_OBJECT public: - NetMon(QWidget *parent, KConfig * config=0, const char * name=0); + NetMon(TQWidget *parent, KConfig * config=0, const char * name=0); void saveSettings() {}; void loadSettings() {}; private: KConfig *configFile; KProcess *showmountProc; - QListView *list; - QLabel *version; - QTimer *timer; - QListViewItem *killrow; + TQListView *list; + TQLabel *version; + TQTimer *timer; + TQListViewItem *killrow; int rownumber; enum {header, connexions, locked_files, finished, nfs} readingpart; int lo[65536]; @@ -53,7 +53,7 @@ private: void processNFSLine(char *bufline, int linelen); void processSambaLine(char *bufline, int linelen); - QCString strShare, strUser, strGroup, strMachine, strSince, strPid; + TQCString strShare, strUser, strGroup, strMachine, strSince, strPid; int iUser, iGroup, iMachine, iPid; private slots: diff --git a/kcontrol/samba/main.cpp b/kcontrol/samba/main.cpp index f6df8f91b..88d95680a 100644 --- a/kcontrol/samba/main.cpp +++ b/kcontrol/samba/main.cpp @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qtabwidget.h> +#include <tqlayout.h> +#include <tqtabwidget.h> #include <kaboutdata.h> #include <kcmodule.h> @@ -32,24 +32,24 @@ class SambaContainer:public KCModule { public: - SambaContainer(QWidget *parent=0, const char * name=0, const QStringList &list = QStringList() ); + SambaContainer(TQWidget *parent=0, const char * name=0, const TQStringList &list = TQStringList() ); virtual ~SambaContainer(); virtual void load(); virtual void save(); private: KConfig config; - QTabWidget tabs; + TQTabWidget tabs; NetMon status; ImportsView imports; LogView logView; StatisticsView statisticsView; }; -typedef KGenericFactory<SambaContainer, QWidget > SambaFactory; +typedef KGenericFactory<SambaContainer, TQWidget > SambaFactory; K_EXPORT_COMPONENT_FACTORY (kcm_samba, SambaFactory("kcmsamba") ) -SambaContainer::SambaContainer(QWidget *parent, const char* name, const QStringList&) +SambaContainer::SambaContainer(TQWidget *parent, const char* name, const TQStringList&) :KCModule(SambaFactory::instance(), parent,name) ,config("kcmsambarc",false,true) ,tabs(this) @@ -58,13 +58,13 @@ SambaContainer::SambaContainer(QWidget *parent, const char* name, const QStringL ,logView(&tabs,&config) ,statisticsView(&tabs,&config) { - QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); layout->addWidget(&tabs); tabs.addTab(&status,i18n("&Exports")); tabs.addTab(&imports,i18n("&Imports")); tabs.addTab(&logView,i18n("&Log")); tabs.addTab(&statisticsView,i18n("&Statistics")); - connect(&logView,SIGNAL(contentsChanged(QListView* , int, int)),&statisticsView,SLOT(setListInfo(QListView *, int, int))); + connect(&logView,TQT_SIGNAL(contentsChanged(TQListView* , int, int)),&statisticsView,TQT_SLOT(setListInfo(TQListView *, int, int))); setButtons(Help); load(); |