void GalleryWindow::slotSettings() { // TODO: reload albumlist if OK slot used. QPointer<GalleryEdit> dlg = new GalleryEdit(kapp->activeWindow(), mpGallery, i18n("Edit Gallery Data") ); if( dlg->exec() == QDialog::Accepted ) { slotDoLogin(); } delete dlg; }
void PiwigoWindow::slotSettings() { // TODO: reload albumlist if OK slot used. QPointer<PiwigoLoginDlg> dlg = new PiwigoLoginDlg(QApplication::activeWindow(), d->pPiwigo, i18n("Edit Piwigo Data") ); if (dlg->exec() == QDialog::Accepted) { slotDoLogin(); } delete dlg; }
PiwigoWindow::PiwigoWindow(DInfoInterface* const iface, QWidget* const /*parent*/) : WSToolDialog(nullptr, QLatin1String("PiwigoSync Dialog")), d(new Private(this, iface)) { d->pPiwigo = new PiwigoSession(); setWindowTitle( i18n("Piwigo Export") ); setModal(false); // "Start Upload" button startButton()->setText( i18n("Start Upload") ); startButton()->setEnabled(false); connect(startButton(), SIGNAL(clicked()), this, SLOT(slotAddPhoto())); // we need to let d->talker work.. d->talker = new PiwigoTalker(iface, d->widget); // setting progressDlg and its numeric hints d->progressDlg = new QProgressDialog(this); d->progressDlg->setModal(true); d->progressDlg->setAutoReset(true); d->progressDlg->setAutoClose(true); d->progressDlg->setMaximum(0); d->progressDlg->reset(); d->pUploadList = new QStringList; // connect functions connectSignals(); QPointer<PiwigoLoginDlg> configDlg; KConfig config; if (!config.hasGroup("Piwigo Settings") ) { configDlg = new PiwigoLoginDlg(QApplication::activeWindow(), d->pPiwigo, i18n("Edit Piwigo Data") ); if (configDlg->exec() != QDialog::Accepted) { delete configDlg; } } readSettings(); slotDoLogin(); }
void GalleryWindow::slotLoginFailed(const QString& msg) { if (KMessageBox::warningYesNo(this, i18n("Failed to login into remote gallery. ") + msg + i18n("\nDo you want to check your settings and try again?")) != KMessageBox::Yes) { close(); return; } QPointer<GalleryEdit> configDlg = new GalleryEdit(kapp->activeWindow(), mpGallery, i18n("Edit Gallery Data") ); if ( configDlg->exec() != QDialog::Accepted ) { delete configDlg; return; } slotDoLogin(); delete configDlg; }
void PiwigoWindow::slotLoginFailed(const QString& msg) { if (QMessageBox::question(this, i18n("Login Failed"), i18n("Failed to login into remote piwigo. ") + msg + i18n("\nDo you want to check your settings and try again?")) != QMessageBox::Yes) { close(); return; } QPointer<PiwigoLoginDlg> configDlg = new PiwigoLoginDlg(QApplication::activeWindow(), d->pPiwigo, i18n("Edit Piwigo Data") ); if (configDlg->exec() != QDialog::Accepted) { delete configDlg; return; } slotDoLogin(); delete configDlg; }
GalleryWindow::GalleryWindow(Interface* interface, QWidget *parent, Gallery* pGallery) : KDialog(parent), m_interface(interface), mpGallery(pGallery), d(new Private(this)) { setWindowTitle( i18n("Gallery Export") ); setButtons( KDialog::Close | KDialog::User1 | KDialog::Help); setModal(false); // About data. m_about = new KPAboutData(ki18n("Gallery Export"), 0, KAboutData::License_GPL, ki18n("A Kipi plugin to export image collections to a remote Gallery server."), ki18n("(c) 2003-2005, Renchi Raju\n" "(c) 2006-2007, Colin Guthrie\n" "(c) 2006-2009, Gilles Caulier\n" "(c) 2008, Andrea Diamantini\n")); m_about->addAuthor(ki18n("Renchi Raju"), ki18n("Author"), "renchi dot raju at gmail dot com"); m_about->addAuthor(ki18n("Colin Guthrie"), ki18n("Maintainer"), "kde at colin dot guthr dot ie"); m_about->addAuthor(ki18n("Andrea Diamantini"), ki18n("Developer"), "adjam7 at gmail dot com"); m_about->addAuthor(ki18n("Gilles Caulier"), ki18n("Developer"), "caulier dot gilles at gmail dot com"); // help button disconnect(this, SIGNAL(helpClicked()), this, SLOT(slotHelp())); KHelpMenu *helpMenu = new KHelpMenu(this, m_about, false); helpMenu->menu()->removeAction(helpMenu->menu()->actions().first()); QAction *handbook = new QAction(i18n("Handbook"), this); connect(handbook, SIGNAL(triggered(bool)), this, SLOT(slotHelp())); helpMenu->menu()->insertAction(helpMenu->menu()->actions().first(), handbook); button(Help)->setMenu(helpMenu->menu()); // User1 Button : to conf gallery settings KPushButton *confButton = button( User1 ); confButton->setText( i18n("Settings") ); confButton->setIcon( KIcon("configure") ); connect(confButton, SIGNAL(clicked()), this, SLOT(slotSettings()) ); // we need to let m_talker work.. m_talker = new GalleryTalker(d->widget); // setting progressDlg and its numeric hints m_progressDlg = new QProgressDialog(this); m_progressDlg->setModal(true); m_progressDlg->setAutoReset(true); m_progressDlg->setAutoClose(true); m_uploadCount = 0; m_uploadTotal = 0; mpUploadList = new QStringList; // connect functions connectSignals(); // read Settings readSettings(); slotDoLogin(); }