diff --git a/src/danbooruconnectwidget.cpp b/src/danbooruconnectwidget.cpp new file mode 100644 index 0000000..f236564 --- /dev/null +++ b/src/danbooruconnectwidget.cpp @@ -0,0 +1,35 @@ +/* + * This file is part of Danbooru Client. + * Copyright 2013 Luca Beltrame + * + * 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; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "danbooruconnectwidget.h" + + +Danbooru::DanbooruConnectWidget::DanbooruConnectWidget(QVector< KUrl > urlList, QWidget* parent): QWidget(parent) +{ + +} + +Danbooru::DanbooruConnectWidget::~DanbooruConnectWidget() +{ + +} + diff --git a/src/danbooruconnectwidget.h b/src/danbooruconnectwidget.h new file mode 100644 index 0000000..6d05727 --- /dev/null +++ b/src/danbooruconnectwidget.h @@ -0,0 +1,58 @@ +/* + * This file is part of Danbooru Client. + * Copyright 2013 Luca Beltrame + * + * 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; either version 2 of + * the License or (at your option) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "ui_danbooruconnectwidget.h" + +#include +#include +#include + +#include + +namespace Danbooru { + + class DanbooruConnectWidget: public QWidget, public Ui::DanbooruConnectWidget { + Q_OBJECT + + public: + explicit DanbooruConnectWidget(QVector urlList, + QWidget* parent = 0); + ~DanbooruConnectWidget(); + + QString username() const; + QString password() const; + + private: + KUrl m_Boardurl; + QString m_username; + QString m_password; + + Q_SIGNALS: + void connectionEstablished(); + void rejected(); + + + + }; + + +} // namespace Danbooru diff --git a/src/ui/danbooruconnectwidget.ui b/src/ui/danbooruconnectwidget.ui new file mode 100644 index 0000000..3430180 --- /dev/null +++ b/src/ui/danbooruconnectwidget.ui @@ -0,0 +1,121 @@ + + + DanbooruConnectWidget + + + + 0 + 0 + 720 + 39 + + + + + + + + + + true + + + + + + + Danbooru URL + + + + + + + + 0 + 0 + + + + false + + + + + + + Username + + + + + + + Danbooru username (optional) + + + + + + + Password + + + + + + + Danbooru password (optional) + + + true + + + + + + + Anonymous + + + true + + + + + + + QDialogButtonBox::Ok + + + false + + + + + + + + KDialogButtonBox + QDialogButtonBox +
kdialogbuttonbox.h
+
+ + KComboBox + QComboBox +
kcombobox.h
+
+ + KLineEdit + QLineEdit +
klineedit.h
+
+ + KPushButton + QPushButton +
kpushbutton.h
+
+
+ + +