summaryrefslogtreecommitdiffstats
path: root/kpackage/kpackage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpackage/kpackage.cpp')
-rw-r--r--kpackage/kpackage.cpp142
1 files changed, 71 insertions, 71 deletions
diff --git a/kpackage/kpackage.cpp b/kpackage/kpackage.cpp
index 5c328e1..c5dd2eb 100644
--- a/kpackage/kpackage.cpp
+++ b/kpackage/kpackage.cpp
@@ -31,9 +31,9 @@
#include "../config.h"
-#include <qdir.h>
-#include <qlabel.h>
-#include <qframe.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqframe.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -93,94 +93,94 @@ KPKG::KPKG(KConfig *_config)
void KPKG::setupMenu()
{
- pack_open = KStdAction::open(kpackage, SLOT(fileOpen()),
+ pack_open = KStdAction::open(kpackage, TQT_SLOT(fileOpen()),
actionCollection());
- recent = KStdAction::openRecent(this, SLOT(openRecent(const KURL&)),
+ recent = KStdAction::openRecent(this, TQT_SLOT(openRecent(const KURL&)),
actionCollection());
recent->loadEntries( config );
pack_find = new KAction( i18n("Find &Package..."), "find",
KStdAccel::shortcut(KStdAccel::Find), kpackage,
- SLOT(find()), actionCollection(), "pack_find");
+ TQT_SLOT(find()), actionCollection(), "pack_find");
pack_findf = new KAction( i18n("Find &File..."), "filefind",
0, kpackage,
- SLOT(findf()), actionCollection(), "pack_findf");
+ TQT_SLOT(findf()), actionCollection(), "pack_findf");
kpack_reload = new KAction( i18n("&Reload"), "reload",
KStdAccel::shortcut(KStdAccel::Reload), kpackage,
- SLOT(reload()), actionCollection(), "kpack_reload");
+ TQT_SLOT(reload()), actionCollection(), "kpack_reload");
- (void) KStdAction::quit(kpackage, SLOT(fileQuit()),
+ (void) KStdAction::quit(kpackage, TQT_SLOT(fileQuit()),
actionCollection());
- pack_prev = KStdAction::back(kpackage->management->treeList, SLOT(previous()),
+ pack_prev = KStdAction::back(kpackage->management->treeList, TQT_SLOT(previous()),
actionCollection(),"pack_prev");
- pack_next = KStdAction::forward(kpackage->management->treeList, SLOT(next()),
+ pack_next = KStdAction::forward(kpackage->management->treeList, TQT_SLOT(next()),
actionCollection(),"pack_next");
(void) (new KAction( i18n("&Expand Tree"), "ftout",
0, kpackage,
- SLOT(expandTree()), actionCollection(), "kpack_expand"));
+ TQT_SLOT(expandTree()), actionCollection(), "kpack_expand"));
(void) (new KAction( i18n("&Collapse Tree"), "ftin",
0, kpackage,
- SLOT(collapseTree()), actionCollection(), "kpack_collapse"));
+ TQT_SLOT(collapseTree()), actionCollection(), "kpack_collapse"));
- (void) (new KAction( i18n("Clear &Marked"), QString::null,
+ (void) (new KAction( i18n("Clear &Marked"), TQString::null,
0, kpackage,
- SLOT(clearMarked()), actionCollection(), "kpack_clear"));
+ TQT_SLOT(clearMarked()), actionCollection(), "kpack_clear"));
- (void) (new KAction( i18n("Mark &All"), QString::null,
+ (void) (new KAction( i18n("Mark &All"), TQString::null,
0, kpackage,
- SLOT(markAll()), actionCollection(), "kpack_markall"));
+ TQT_SLOT(markAll()), actionCollection(), "kpack_markall"));
- pack_install = new KAction( i18n("&Install"), QString::null,
+ pack_install = new KAction( i18n("&Install"), TQString::null,
0, kpackage->management,
- SLOT(installSingleClicked()), actionCollection(), "install_single");
+ TQT_SLOT(installSingleClicked()), actionCollection(), "install_single");
pack_install->setEnabled(false);
kpackage->management->setInstallAction(pack_install);
- pack_uninstall = new KAction( i18n("&Uninstall"), QString::null,
+ pack_uninstall = new KAction( i18n("&Uninstall"), TQString::null,
0, kpackage->management,
- SLOT(uninstallSingleClicked()), actionCollection(), "uninstall_single");
+ TQT_SLOT(uninstallSingleClicked()), actionCollection(), "uninstall_single");
pack_uninstall->setEnabled(false);
kpackage->management->setUninstallAction(pack_uninstall);
- (void) (new KAction( i18n("&Install Marked"), QString::null,
+ (void) (new KAction( i18n("&Install Marked"), TQString::null,
0, kpackage->management,
- SLOT(installMultClicked()), actionCollection(), "install_marked"));
+ TQT_SLOT(installMultClicked()), actionCollection(), "install_marked"));
- (void) (new KAction( i18n("&Uninstall Marked"), QString::null,
+ (void) (new KAction( i18n("&Uninstall Marked"), TQString::null,
0, kpackage->management,
- SLOT(uninstallMultClicked()), actionCollection(), "uninstall_marked"));
+ TQT_SLOT(uninstallMultClicked()), actionCollection(), "uninstall_marked"));
setStandardToolBarMenuEnabled(true);
- KStdAction::configureToolbars( this, SLOT(configureToolBars()),
+ KStdAction::configureToolbars( this, TQT_SLOT(configureToolBars()),
actionCollection());
- KStdAction::saveOptions( this, SLOT(saveSettings()), actionCollection());
+ KStdAction::saveOptions( this, TQT_SLOT(saveSettings()), actionCollection());
- KStdAction::keyBindings( guiFactory(), SLOT(configureShortcuts()), actionCollection());
+ KStdAction::keyBindings( guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection());
(void) (new KAction( i18n("Configure &KPackage..."), "configure",
0, this,
- SLOT(setOptions()), actionCollection(), "kpack_options"));
+ TQT_SLOT(setOptions()), actionCollection(), "kpack_options"));
- (void) (new KAction( i18n("Clear Package &Folder Cache"), QString::null,
+ (void) (new KAction( i18n("Clear Package &Folder Cache"), TQString::null,
0, this,
- SLOT(clearDCache()), actionCollection(), "clear_dcache"));
+ TQT_SLOT(clearDCache()), actionCollection(), "clear_dcache"));
- (void) (new KAction( i18n("Clear &Package Cache"), QString::null,
+ (void) (new KAction( i18n("Clear &Package Cache"), TQString::null,
0, this,
- SLOT(clearPCache()), actionCollection(), "clear_pcache"));
+ TQT_SLOT(clearPCache()), actionCollection(), "clear_pcache"));
int i;
for (i = 0; i < kpinterfaceN; i++) {
@@ -230,7 +230,7 @@ void KPKG::openRecent(const KURL& url){
kpackage->openNetFile( url );
}
-void KPKG::add_recent_file(const QString &newfile){
+void KPKG::add_recent_file(const TQString &newfile){
KURL url = KURL(newfile);
@@ -239,7 +239,7 @@ void KPKG::add_recent_file(const QString &newfile){
void KPKG::configureToolBars() {
KEditToolbar dlg(actionCollection());
- connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+ connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
dlg.exec();
}
@@ -287,7 +287,7 @@ void KPKG::saveProperties(KConfig *config )
void KPKG::readProperties(KConfig *config)
{
- QString entry = config->readPathEntry("Name"); // no default
+ TQString entry = config->readPathEntry("Name"); // no default
if (entry.isNull())
return;
kpackage->openNetFiles(entry);
@@ -302,8 +302,8 @@ bool KPKG::queryClose() {
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
-KPACKAGE::KPACKAGE(KConfig *_config, QWidget *parent)
- : QWidget(parent)
+KPACKAGE::KPACKAGE(KConfig *_config, TQWidget *parent)
+ : TQWidget(parent)
{
// Save copy of config
@@ -329,7 +329,7 @@ KPACKAGE::~KPACKAGE()
}
// resize event -- arrange the widgets
-void KPACKAGE::resizeEvent(QResizeEvent *re)
+void KPACKAGE::resizeEvent(TQResizeEvent *re)
{
re = re; // prevent warning
arrangeWidgets();
@@ -364,12 +364,12 @@ void KPACKAGE::destroyModeWidgets()
// Set up the status bar
void KPACKAGE::setupStatusBar()
{
- statusbar = new QFrame(this);
- statusbar->setFrameStyle(QFrame::Raised | QFrame::Panel);
+ statusbar = new TQFrame(this);
+ statusbar->setFrameStyle(TQFrame::Raised | TQFrame::Panel);
processProgress = new KProgress(100,statusbar);
processProgress->setTextEnabled(FALSE);
- status = new QLabel(i18n("Management Mode"), statusbar);
+ status = new TQLabel(i18n("Management Mode"), statusbar);
}
// Arrange the widgets nicely
@@ -455,13 +455,13 @@ void KPACKAGE::collapseTree()
management->treeList->collapseTree(management->treeList);
}
-pkgInterface *KPACKAGE::pkType(const QString &fname)
+pkgInterface *KPACKAGE::pkType(const TQString &fname)
{
// Get the package information for this package
char buf[51];
int i;
- FILE *file= fopen(QFile::encodeName(fname),"r");
+ FILE *file= fopen(TQFile::encodeName(fname),"r");
if (file) {
fgets(buf,sizeof(buf)-1,file);
buf[50] = 0;
@@ -504,28 +504,28 @@ int KPACKAGE::typeIndex(pkgInterface *type) {
return -1;
}
-void KPACKAGE::openNetFiles (const QStringList &urls, bool install )
+void KPACKAGE::openNetFiles (const TQStringList &urls, bool install )
{
- QStringList files;
+ TQStringList files;
int i;
int index;
- QPtrList<packageInfo> **lst = new QPtrList<packageInfo>*[kpinterfaceN];
+ TQPtrList<packageInfo> **lst = new TQPtrList<packageInfo>*[kpinterfaceN];
packageInfo *pk = 0;
kdDebug() << "openNetFiles\n";
- for (QStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it) {
+ for (TQStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it) {
files.append(fetchNetFile(*it));
kpkg->add_recent_file(*it);
}
for (i = 0; i < kpinterfaceN; i++) {
if (kpinterface[i]) {
- lst[i] = new QPtrList<packageInfo>;
+ lst[i] = new TQPtrList<packageInfo>;
}
}
- for (QStringList::Iterator t = files.begin(); t != files.end(); ++t) {
+ for (TQStringList::Iterator t = files.begin(); t != files.end(); ++t) {
pkgInterface *type = pkType(*t);
index = typeIndex(type);
if (index >= 0) {
@@ -579,10 +579,10 @@ void KPACKAGE::openNetFile(const KURL &url, bool install )
-QString KPACKAGE::getFileName(const KURL & url, QString &cacheName )
+TQString KPACKAGE::getFileName(const KURL & url, TQString &cacheName )
{
- QString none = "";
- QString fname = "";
+ TQString none = "";
+ TQString fname = "";
if ( !url.isValid() ) {
KpMsgE(i18n("Malformed URL: %1").arg(url.url()),TRUE);
@@ -594,13 +594,13 @@ QString KPACKAGE::getFileName(const KURL & url, QString &cacheName )
fname = url.path();
} else {
- QString tmpd = cacheObj::PDir();
+ TQString tmpd = cacheObj::PDir();
if (!tmpd.isEmpty()) {
- QString cacheFile = tmpd + url.fileName();
+ TQString cacheFile = tmpd + url.fileName();
cacheName = cacheFile;
- QFileInfo f(cacheFile);
+ TQFileInfo f(cacheFile);
if (f.exists() && (opts->DCache != Opts::NEVER)) {
fname = cacheFile;
}
@@ -612,9 +612,9 @@ QString KPACKAGE::getFileName(const KURL & url, QString &cacheName )
bool KPACKAGE::isFileLocal( const KURL & url )
{
- QString cf;
+ TQString cf;
- QString f = getFileName(url, cf);
+ TQString f = getFileName(url, cf);
if (cf.isEmpty()) {
return false;
@@ -627,12 +627,12 @@ bool KPACKAGE::isFileLocal( const KURL & url )
}
}
-QString KPACKAGE::fetchNetFile( const KURL & url )
+TQString KPACKAGE::fetchNetFile( const KURL & url )
{
- QString cf;
+ TQString cf;
- QString f = getFileName(url, cf);
+ TQString f = getFileName(url, cf);
if (cf.isEmpty()) {
return "";
@@ -649,9 +649,9 @@ QString KPACKAGE::fetchNetFile( const KURL & url )
if (kio.download(url, cf)) {
setStatus(i18n("KIO finished"));
- QFileInfo fi(cf);
+ TQFileInfo fi(cf);
if (!(fi.exists() && fi.size() > 0)) {
- unlink(QFile::encodeName(cf));
+ unlink(TQFile::encodeName(cf));
return "";
} else {
CacheList cl(fi.dirPath());
@@ -672,7 +672,7 @@ void KPACKAGE::fileOpenUrl(){
bool ok;
- QString url = KInputDialog::getText( QString::null,
+ TQString url = KInputDialog::getText( TQString::null,
i18n( "Open location:" ), save_url.prettyURL(), &ok, this );
if ( ok )
@@ -696,15 +696,15 @@ void KPACKAGE::findf(){
findialog = new FindF(this);
}
-KFileDialog* KPACKAGE::getFileDialog(const QString &captiontext)
+KFileDialog* KPACKAGE::getFileDialog(const TQString &captiontext)
{
if(!file_dialog) {
- file_dialog = new KFileDialog(QDir::currentDirPath(), "",
+ file_dialog = new KFileDialog(TQDir::currentDirPath(), "",
this,"file_dialog",TRUE);
}
- QString pat;
+ TQString pat;
for (int i = 0; i < kpinterfaceN; i++) {
if (kpinterface[i] && opts->handlePackage[i]) {
pat += kpinterface[i]->packagePattern;
@@ -718,12 +718,12 @@ KFileDialog* KPACKAGE::getFileDialog(const QString &captiontext)
return file_dialog;
}
-void KPACKAGE::dragEnterEvent(QDragEnterEvent* e)
+void KPACKAGE::dragEnterEvent(TQDragEnterEvent* e)
{
e->accept(KURLDrag::canDecode(e));
}
-void KPACKAGE::dropEvent(QDropEvent *de) // something has been dropped
+void KPACKAGE::dropEvent(TQDropEvent *de) // something has been dropped
{
KURL::List list;
if (!KURLDrag::decode(de, list) || list.isEmpty())
@@ -732,13 +732,13 @@ void KPACKAGE::dropEvent(QDropEvent *de) // something has been dropped
openNetFiles(list.toStringList());
}
-void KPACKAGE::setStatus(const QString &s) // set the text in the status bar
+void KPACKAGE::setStatus(const TQString &s) // set the text in the status bar
{
status->setText(s);
kapp->processEvents(); // refresh the screen
}
-QString KPACKAGE::getStatus() // get the text in the status bar
+TQString KPACKAGE::getStatus() // get the text in the status bar
{
if(status)
return status->text();