void CanvasAppliance::slotAddCanvas() { QStringList fwFilePaths = FotowallFile::getLoadFotowallFiles(); if (fwFilePaths.isEmpty()) return; m_extCanvas->addCanvasViewContent(fwFilePaths); setFocusToScene(); }
void CanvasAppliance::slotAddPicture() { // make up the default load path (stored as 'Fotowall/LoadImagesDir') QString defaultLoadPath = App::settings->value("Fotowall/LoadImagesDir").toString(); // ask the file name, validate it, store back to settings and load the file QStringList picFilePaths = QFileDialog::getOpenFileNames(0, tr("Add Pictures to the Canvas"), defaultLoadPath, tr("Images (%1)").arg(App::supportedImageFormats()) /*, 0, QFileDialog::DontResolveSymlinks*/); if (picFilePaths.isEmpty()) return; App::settings->setValue("Fotowall/LoadImagesDir", QFileInfo(picFilePaths[0]).absolutePath()); m_extCanvas->addPictureContent(picFilePaths); setFocusToScene(); }
HelpAppliance::HelpAppliance(QObject *parent) : QObject(parent) , m_helpScene(new HelpScene) , m_dummyWidget(new QWidget) { // create the gui components over a dummy widget ui.setupUi(m_dummyWidget); ui.tutorialButton->setVisible(App::onlineServices->checkForTutorial()); connect(App::onlineServices, SIGNAL(tutorialFound(bool)), ui.tutorialButton, SLOT(setVisible(bool))); connect(ui.webButton, SIGNAL(clicked()), App::onlineServices, SLOT(openWebpage())); connect(ui.blogButton, SIGNAL(clicked()), App::onlineServices, SLOT(openBlog())); connect(ui.tutorialButton, SIGNAL(clicked()), App::onlineServices, SLOT(openTutorial())); connect(ui.updateButton, SIGNAL(clicked()), App::onlineServices, SLOT(checkForUpdates())); // listen to scene events connect(m_helpScene->helpItem, SIGNAL(closeMe()), this, SLOT(slotClose())); // customize appliance sceneSet(m_helpScene); topbarAddWidget(ui.helpBox); setFocusToScene(); }
void CanvasAppliance::slotAddWordcloud() { m_extCanvas->addWordcloudContent(); setFocusToScene(); }
void CanvasAppliance::slotAddWebcam() { int webcamIndex = sender()->property("index").toInt(); m_extCanvas->addWebcamContent(webcamIndex); setFocusToScene(); }
void CanvasAppliance::slotAddText() { m_extCanvas->addTextContent(); setFocusToScene(); }