2013-07-04 21:59:40 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Daniel Molkentin <danimo@owncloud.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SETTINGSDIALOG_H
|
|
|
|
#define SETTINGSDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QStyledItemDelegate>
|
|
|
|
|
2014-07-11 02:31:24 +04:00
|
|
|
#include "progressdispatcher.h"
|
2013-07-05 20:46:43 +04:00
|
|
|
|
2014-12-01 13:37:06 +03:00
|
|
|
class QAction;
|
2013-07-04 21:59:40 +04:00
|
|
|
class QStandardItemModel;
|
|
|
|
|
2014-11-10 00:34:07 +03:00
|
|
|
namespace OCC {
|
2013-07-04 21:59:40 +04:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class SettingsDialog;
|
|
|
|
}
|
|
|
|
class AccountSettings;
|
|
|
|
class Application;
|
2013-07-22 14:11:12 +04:00
|
|
|
class FolderMan;
|
2013-10-01 15:52:07 +04:00
|
|
|
class ownCloudGui;
|
2013-07-04 21:59:40 +04:00
|
|
|
|
|
|
|
class SettingsDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2013-10-01 15:52:07 +04:00
|
|
|
explicit SettingsDialog(ownCloudGui *gui, QWidget *parent = 0);
|
2013-07-04 21:59:40 +04:00
|
|
|
~SettingsDialog();
|
|
|
|
|
|
|
|
void addAccount(const QString &title, QWidget *widget);
|
2013-09-11 12:24:31 +04:00
|
|
|
void setGeneralErrors( const QStringList& errors );
|
2013-07-04 21:59:40 +04:00
|
|
|
|
2013-10-01 15:52:07 +04:00
|
|
|
public slots:
|
2013-11-29 14:18:59 +04:00
|
|
|
void showActivityPage();
|
2014-12-01 13:37:06 +03:00
|
|
|
void slotSwitchPage(QAction *action);
|
2013-10-01 15:52:07 +04:00
|
|
|
|
2013-09-20 16:18:28 +04:00
|
|
|
protected:
|
2014-07-10 01:22:28 +04:00
|
|
|
void reject() Q_DECL_OVERRIDE;
|
|
|
|
void accept() Q_DECL_OVERRIDE;
|
2013-09-20 16:18:28 +04:00
|
|
|
|
2014-08-15 17:01:01 +04:00
|
|
|
private slots:
|
|
|
|
|
2013-07-04 21:59:40 +04:00
|
|
|
private:
|
2014-12-01 15:08:49 +03:00
|
|
|
Ui::SettingsDialog * const _ui;
|
2014-12-01 13:37:06 +03:00
|
|
|
QHash<QAction*, QWidget*> _actions;
|
2014-12-01 15:08:49 +03:00
|
|
|
AccountSettings * const _accountSettings;
|
|
|
|
QAction * _protocolAction;
|
2013-07-04 21:59:40 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SETTINGSDIALOG_H
|