MainWindow::MainWindow(const QString& dir, QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), dirwatch(dir) { ui->setupUi(this); connect(ui->btnReload, SIGNAL(clicked()), this, SLOT(btnPressed())); connect(&dirwatch, SIGNAL(fileAdded(int, const QString)), this, SLOT(listIn(int, const QString&))); connect(&dirwatch, SIGNAL(fileRemoved(int, const QString)), this, SLOT(listOut(int, const QString&))); connect(ui->txtEdit, SIGNAL(textChanged(const QString&)), this, SLOT(txtFilter(const QString&))); ui->listFiles->addItems(dirwatch.scan()); }
SmbConfConfigWidget::SmbConfConfigWidget(QWidget* parent) : QWidget(parent,"configWidget") { QVBoxLayout *layout = new QVBoxLayout(this,5); QLabel *lbl = new QLabel(i18n("<p>The SAMBA configuration file <strong>'smb.conf'</strong>" \ " could not be found;</p>" \ "make sure you have SAMBA installed.\n\n"), this); QHBoxLayout *hbox = new QHBoxLayout(this); QPushButton *btn = new QPushButton(i18n("Specify Location"), this); connect(btn, SIGNAL(pressed()), this, SLOT( btnPressed())); btn->setDefault(false); btn->setAutoDefault(false); hbox->addStretch(); hbox->addWidget(btn); layout->addWidget(lbl); layout->addLayout(hbox); layout->addStretch(); }