void Kfind::startSearch() { // init buffer if(iBuffer) delete [] iBuffer; iBuffer = new char[IBUFSIZE]; iBuffer[0] = 0; QString buffer,pom; //int pos; buffer = tabDialog->createQuery(); if ( winsize==1) winsize=200; emit resultSelected(false); win->clearList(); win->show(); emit haveResults(false); win->beginSearch(); tabDialog->beginSearch(); if (!buffer.isNull()) { enableSearchButton(false); findProcess.clearArguments (); QString cmdline = buffer; findProcess.setExecutable(cmdline); findProcess.start(KProcess::NotifyOnExit, KProcess::AllOutput); }; };
MainWindow::MainWindow(QWidget *parent) : QDialog(parent, flags) { ui.setupUi(this); #ifdef UNICODE #define TCHARToQString(char) QString::fromUtf16((char)) #else #define TCHARToQString(char) QString::fromLocal8Bit((char)) #endif TCHAR folder[MAX_PATH] = {0}; SHGetSpecialFolderPath(NULL, folder, CSIDL_PERSONAL, 0); savePath = TCHARToQString( folder); savePath += "\\My Pictures"; // this->httpManager=new QNetworkAccessManager(this); connect(this->manager, SIGNAL(finished(QNetworkReply*)),this,SLOT(replyFinished(QNetworkReply*))); QObject::connect(ui.searchBtn,SIGNAL(clicked()),this,SLOT(searchBtn_Clicked())); QObject::connect(ui.pathSetBtn,SIGNAL(clicked()),this,SLOT(savePathBtn_Clicked())); QObject::connect(ui.saveBtn,SIGNAL(clicked()),this,SLOT(saveBtn_Clicked())); QObject::connect(ui.urlLineEdit,SIGNAL(textChanged(QString)),this,SLOT(enableSearchButton())); ui.urlLineEdit->setFocus(); ui.saveBtn->setEnabled(false); ui.searchBtn->setEnabled(false); }
void Kfind::stopSearch() { // printf("Stoping Search\n"); tabDialog->endSearch(); win->doneSearch(); enableSearchButton(true); findProcess.kill(); };
void Kfind::processResults() { win->show(); win->doneSearch(); tabDialog->endSearch(); emit haveResults(true); emit enableStatusBar(true); enableSearchButton(true); };
int TISSASearch::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_pushButton_clicked(); break; case 1: on_pushButton_2_clicked(); break; case 2: on_pushButton_3_clicked(); break; case 3: enableFindButton((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 4: enableSearchButton((*reinterpret_cast< const QString(*)>(_a[1]))); break; default: ; } _id -= 5; } return _id; }