void InitSeafileDialog::chooseDir() { QString initial_path; // On windows, set the initial path to the max volume, on linux/mac, set // to the home direcotry. QString dir = QFileDialog::getExistingDirectory(this, tr("Please choose a directory"), getInitialPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); if (dir.isEmpty()) return; mDirectory->setText(dir); }
InitSeafileDialog::InitSeafileDialog(QWidget *parent) : QDialog(parent) { setupUi(this); setWindowTitle(tr("Seafile Initialzation")); setWindowIcon(QIcon(":/images/seafile.png")); connect(mChooseDirBtn, SIGNAL(clicked()), this, SLOT(chooseDir())); connect(mOkBtn, SIGNAL(clicked()), this, SLOT(onOkClicked())); connect(mCancelBtn, SIGNAL(clicked()), this, SLOT(onCancelClicked())); mLogo->setPixmap(QPixmap(":/images/seafile-32.png")); mDirectory->setText(getInitialPath()); const QRect screen = QApplication::desktop()->screenGeometry(); move(screen.center() - this->rect().center()); }
InitSeafileDialog::InitSeafileDialog(QWidget *parent) : QDialog(parent) { setupUi(this); setWindowTitle(tr("%1 Initialization").arg(getBrand())); setWindowIcon(QIcon(":/images/seafile.png")); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); connect(mChooseDirBtn, SIGNAL(clicked()), this, SLOT(chooseDir())); connect(mOkBtn, SIGNAL(clicked()), this, SLOT(onOkClicked())); connect(mCancelBtn, SIGNAL(clicked()), this, SLOT(onCancelClicked())); mTitle->setStyleSheet("QLabel { color : #0099EE; }"); //disk42 mLogo->setPixmap(QPixmap(":/images/seafile-32.png")); mDirectory->setText(getInitialPath()); const QRect screen = QApplication::desktop()->screenGeometry(); move(screen.center() - this->rect().center()); }
bool SimpleSolve::doSolve(Solver& s, const SolveParams& p) { s.stats.reset(); Enumerator* enumerator = s.sharedContext()->enumerator(); bool hasWork = true, complete = true; InitParams init= p.init; SolveLimits lim = getSolveLimits(); Timer<RealTime> tt; tt.start(); s.sharedContext()->reportProgress(SolveStateEvent(s, "algorithm")); // Remove any existing assumptions and restore solver to a usable state. // If this fails, the problem is unsat, even under no assumptions. while (s.clearAssumptions() && hasWork) { // Add assumptions - if this fails, the problem is unsat // under the current assumptions but not necessarily unsat. if (initPath(s, getInitialPath(), init)) { complete = (solvePath(s, p, lim) != value_free && s.decisionLevel() == s.rootLevel()); } // finished current work item hasWork = complete && enumerator->optimizeNext(); } setSolveLimits(lim); tt.stop(); s.sharedContext()->reportProgress(SolveStateEvent(s, "algorithm", tt.total())); return !complete; }