Example #1
0
void CanvasAppliance::slotAddCanvas()
{
    QStringList fwFilePaths = FotowallFile::getLoadFotowallFiles();
    if (fwFilePaths.isEmpty())
        return;
    m_extCanvas->addCanvasViewContent(fwFilePaths);
    setFocusToScene();
}
Example #2
0
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();
}
Example #3
0
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();
}
Example #4
0
void CanvasAppliance::slotAddWordcloud()
{
    m_extCanvas->addWordcloudContent();
    setFocusToScene();
}
Example #5
0
void CanvasAppliance::slotAddWebcam()
{
    int webcamIndex = sender()->property("index").toInt();
    m_extCanvas->addWebcamContent(webcamIndex);
    setFocusToScene();
}
Example #6
0
void CanvasAppliance::slotAddText()
{
    m_extCanvas->addTextContent();
    setFocusToScene();
}