Commit 3053f771 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

polish

parent b0dd26ff
......@@ -57,12 +57,12 @@ class RajceSession : public QObject
public:
explicit RajceSession(QWidget * jobParent, const QString& tmpDir);
explicit RajceSession(QWidget* jobParent, const QString& tmpDir);
void init(const SessionState& initialState);
void init(const SessionState& initialState);
const SessionState& state() const;
void login(const QString& username, const QString& password);
void logout();
void login(const QString& username, const QString& password);
void logout();
void loadAlbums();
void createAlbum(const QString& name, const QString& description, bool visible);
......
This diff is collapsed.
......@@ -23,7 +23,12 @@
#ifndef KIPIRAJCEEXPORTPLUGIN_RAJCEWIDGET_H
#define KIPIRAJCEEXPORTPLUGIN_RAJCEWIDGET_H
// Qt includes
#include <QWidget>
// Local includes
#include "sessionstate.h"
class QLabel;
......@@ -34,16 +39,19 @@ class QProgressBar;
class KComboBox;
class KPushButton;
namespace KIPI {
namespace KIPI
{
class Interface;
class UploadWidget;
}
namespace KIPIPlugins {
namespace KIPIPlugins
{
class ImagesList;
}
namespace KIPIRajceExportPlugin {
namespace KIPIRajceExportPlugin
{
class RajceSession;
class Album;
......@@ -51,7 +59,9 @@ class Album;
class RajceWidget : public QWidget
{
Q_OBJECT
public:
explicit RajceWidget(KIPI::Interface* interface, const QString& tmpFolder, QWidget* parent);
Q_SIGNALS:
......@@ -61,15 +71,12 @@ Q_SIGNALS:
public Q_SLOTS:
void update();
void reactivate();
void startUpload();
void cancelUpload();
void writeSettings();
void readSettings();
private Q_SLOTS:
......@@ -77,58 +84,55 @@ private Q_SLOTS:
void changeUserClicked();
void progressStarted(unsigned);
void progressFinished(unsigned);
void progressChange(unsigned, unsigned percent);
void loadAlbums();
void createAlbum();
void closeAlbum();
void uploadNext();
void startUploadAfterAlbumOpened();
void closeAlbum();
void selectedAlbumChanged(const QString&);
private:
void _setEnabled(bool);
QLabel * _headerLbl;
QLabel * _userNameLbl;
QLabel * _userName;
private:
QRadioButton * _anonymousRBtn;
QRadioButton * _accountRBtn;
QLabel* _headerLbl;
QLabel* _userNameLbl;
QLabel* _userName;
QSpinBox * _dimensionSpB;
QSpinBox * _imageQualitySpB;
QRadioButton* _anonymousRBtn;
QRadioButton* _accountRBtn;
KComboBox * _albumsCoB;
QSpinBox* _dimensionSpB;
QSpinBox* _imageQualitySpB;
KPushButton * _newAlbumBtn;
KPushButton * _reloadAlbumsBtn;
KPushButton * _changeUserBtn;
KComboBox* _albumsCoB;
KIPIPlugins::ImagesList * _imgList;
KIPI::UploadWidget * _uploadWidget;
KPushButton* _newAlbumBtn;
KPushButton* _reloadAlbumsBtn;
KPushButton* _changeUserBtn;
QProgressBar * _progressBar;
KIPIPlugins::ImagesList* _imgList;
KIPI::UploadWidget* _uploadWidget;
RajceSession * _session;
QProgressBar* _progressBar;
QList<QString> _uploadQueue;
RajceSession* _session;
QList<QString> _uploadQueue;
QList<QString>::Iterator _currentUploadImage;
bool _uploadingPhotos;
bool _lastLoggedInState;
QString _currentAlbumName;
bool _uploadingPhotos;
bool _lastLoggedInState;
QString _currentAlbumName;
};
}
} // namespace KIPIRajceExportPlugin
#endif // KIPIRAJCEEXPORTPLUGIN_RAJCEWIDGET_H
......@@ -22,13 +22,19 @@
#include "rajcewindow.moc"
// Qt includes
#include <QAction>
#include <KLocalizedString>
#include <KToolInvocation>
#include <KHelpMenu>
#include <KMenu>
#include <KPushButton>
// KDE includes
#include <klocalizedstring.h>
#include <ktoolinvocation.h>
#include <khelpmenu.h>
#include <kmenu.h>
#include <kpushbutton.h>
// Local includes
#include "kpaboutdata.h"
#include "rajcewidget.h"
......@@ -36,11 +42,11 @@
namespace KIPIRajceExportPlugin
{
RajceWindow::RajceWindow(KIPI::Interface* interface, const QString& tmpFolder, QWidget* parent,
Qt::WFlags flags): KDialog(0), _interface(interface)
RajceWindow::RajceWindow(KIPI::Interface* interface, const QString& tmpFolder,
QWidget* /*parent*/, Qt::WFlags /*flags*/)
: KDialog(0), _interface(interface)
{
_widget = new RajceWidget(interface, tmpFolder, this);
_widget->readSettings();
setMainWidget(_widget);
......@@ -50,9 +56,8 @@ RajceWindow::RajceWindow(KIPI::Interface* interface, const QString& tmpFolder, Q
setModal(false);
setWindowTitle(i18n("Export to Rajce.net"));
setButtonGuiItem(User1,
KGuiItem(i18n("Start Upload"), "network-workgroup",
i18n("Start upload to Rajce.net")));
setButtonGuiItem(User1, KGuiItem(i18n("Start Upload"), "network-workgroup",
i18n("Start upload to Rajce.net")));
_widget->setMinimumSize(700, 500);
connect(this, SIGNAL(user1Clicked()),
......@@ -81,7 +86,7 @@ RajceWindow::RajceWindow(KIPI::Interface* interface, const QString& tmpFolder, Q
KHelpMenu* helpMenu = new KHelpMenu(this, m_about, false);
helpMenu->menu()->removeAction(helpMenu->menu()->actions().first());
QAction *handbook = new QAction(i18n("Handbook"), this);
QAction* handbook = new QAction(i18n("Handbook"), this);
connect(handbook, SIGNAL(triggered(bool)),
this, SLOT(showHelp()));
helpMenu->menu()->insertAction(helpMenu->menu()->actions().first(), handbook);
......@@ -113,4 +118,3 @@ void RajceWindow::slotClose()
}
} //namespace KIPIRajceExportPlugin
......@@ -23,8 +23,12 @@
#ifndef RAJCEWINDOW_H
#define RAJCEWINDOW_H
// KDE includes
#include <kdialog.h>
// Libkipi includes
#include <libkipi/interface.h>
namespace KIPIPlugins
......@@ -32,15 +36,17 @@ namespace KIPIPlugins
class KPAboutData;
}
namespace KIPIRajceExportPlugin {
namespace KIPIRajceExportPlugin
{
class RajceWidget;
class RajceWindow : public KDialog
{
Q_OBJECT
public:
explicit RajceWindow(KIPI::Interface* interface, const QString& tmpFolder, QWidget* parent = 0, Qt::WFlags flags = 0);
void reactivate();
......@@ -48,15 +54,13 @@ public:
private Q_SLOTS:
void showHelp();
void slotSetUploadButtonEnabled(bool);
void slotClose();
private:
KIPI::Interface* _interface;
RajceWidget* _widget;
KIPI::Interface* _interface;
RajceWidget* _widget;
KIPIPlugins::KPAboutData* m_about;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment