void MainWindow::start(bool isTrue) { if (isTrue) { isStart_ = true; pbStart_->setText(tr("Stop")); connect(watcher_, SIGNAL(fileChanged(QString)), this, SLOT(slotFileChanged(QString))); connect(watcher_, SIGNAL(directoryChanged(QString)), this, SLOT(slotDirectoryChanged(QString))); Common::asyncCopy(leFrom_->text(), leTo_->text()); } else { isStart_ = false; pbStart_->setText(tr("Start")); disconnect(watcher_, SIGNAL(fileChanged(QString)), this, SLOT(slotFileChanged(QString))); disconnect(watcher_, SIGNAL(directoryChanged(QString)), this, SLOT(slotDirectoryChanged(QString))); } }
DlgDirectories::DlgDirectories(QWidget * parent) : DlgDirectoriesBase(parent) { connect( le_ext, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotDirectoryChanged( ) ) ); connect( le_dir, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotDirectoryChanged( ) ) ); le_dir->setMode( KFile::Directory ); lv_entries->setSortColumn( -1 ); slotDirectoryChanged(); }