diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index 1caa14b8..dd50c566 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -1,67 +1,68 @@ set(Ruqola_widgets_SRCS ruqolamainwindow.cpp ruqolacentralwidget.cpp + ruqolaloginwidget.cpp ) set(Ruqola_widgets_dialog_SRCS dialogs/serverinfowidget.cpp dialogs/uploadfiledialog.cpp dialogs/uploadfilewidget.cpp ) set(Ruqola_channellist_SRCS channellist/channellistwidget.cpp channellist/statuscombobox.cpp channellist/channellistview.cpp ) set(Ruqola_roomwidget_SRCS room/roomwidget.cpp room/roomheaderwidget.cpp room/messagelistview.cpp room/messagelineedit.cpp room/messagelistdelegate.cpp room/messagelinewidget.cpp ) ecm_qt_declare_logging_category(Ruqola_widgets_SRCS HEADER ruqolawidgets_debug.h IDENTIFIER RUQOLAWIDGETS_LOG CATEGORY_NAME org.kde.ruqola.widgets) add_library(libruqolawidgets ${Ruqola_widgets_SRCS} ${Ruqola_widgets_dialog_SRCS} ${Ruqola_channellist_SRCS} ${Ruqola_roomwidget_SRCS} ) generate_export_header(libruqolawidgets BASE_NAME libruqolawidgets) target_link_libraries(libruqolawidgets Qt5::Gui Qt5::Widgets KF5::I18n KF5::ConfigCore KF5::XmlGui librocketchatrestapi-qt5 libruqolacore ) if (NOT WIN32) target_link_libraries(libruqolawidgets Qt5::DBus) endif() set_target_properties(libruqolawidgets PROPERTIES OUTPUT_NAME ruqolawidgets VERSION ${RUQOLA_LIB_VERSION} SOVERSION ${RUQOLA_LIB_SOVERSION} ) if (BUILD_TESTING) add_subdirectory(autotests) add_subdirectory(tests) add_subdirectory(channellist/autotests) add_subdirectory(room/autotests) add_subdirectory(dialogs/autotests) endif() install(TARGETS libruqolawidgets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) diff --git a/src/widgets/autotests/CMakeLists.txt b/src/widgets/autotests/CMakeLists.txt index 1a814e6e..ffdd299c 100644 --- a/src/widgets/autotests/CMakeLists.txt +++ b/src/widgets/autotests/CMakeLists.txt @@ -1,11 +1,12 @@ macro(add_ruqolawidget_test _source) set( _test ${_source}) get_filename_component( _name ${_source} NAME_WE ) add_executable( ${_name} ${_test} ) add_test(NAME ${_name} COMMAND ${_name} ) ecm_mark_as_test(${_name}) target_link_libraries( ${_name} Qt5::Test libruqolacore libruqolawidgets) endmacro() add_ruqolawidget_test(ruqolacentralwidgettest.cpp) add_ruqolawidget_test(serverinfowidgettest.cpp) +add_ruqolawidget_test(ruqolaloginwidgettest.cpp) diff --git a/src/widgets/autotests/ruqolaloginwidgettest.cpp b/src/widgets/autotests/ruqolaloginwidgettest.cpp new file mode 100644 index 00000000..7335e8e3 --- /dev/null +++ b/src/widgets/autotests/ruqolaloginwidgettest.cpp @@ -0,0 +1,30 @@ +/* + Copyright (c) 2020 Laurent Montel + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2 of the License or + ( at your option ) version 3 or, at the discretion of KDE e.V. + ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +#include "ruqolaloginwidgettest.h" +#include "ruqolaloginwidget.h" +#include +QTEST_MAIN(RuqolaLoginWidgetTest) +RuqolaLoginWidgetTest::RuqolaLoginWidgetTest(QObject *parent) + : QObject(parent) +{ + +} diff --git a/src/widgets/autotests/ruqolaloginwidgettest.h b/src/widgets/autotests/ruqolaloginwidgettest.h new file mode 100644 index 00000000..ed8f3522 --- /dev/null +++ b/src/widgets/autotests/ruqolaloginwidgettest.h @@ -0,0 +1,35 @@ +/* + Copyright (c) 2020 Laurent Montel + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2 of the License or + ( at your option ) version 3 or, at the discretion of KDE e.V. + ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +#ifndef RUQOLALOGINWIDGETTEST_H +#define RUQOLALOGINWIDGETTEST_H + +#include + +class RuqolaLoginWidgetTest : public QObject +{ + Q_OBJECT +public: + explicit RuqolaLoginWidgetTest(QObject *parent = nullptr); + ~RuqolaLoginWidgetTest() = default; +}; + +#endif // RUQOLALOGINWIDGETTEST_H diff --git a/src/widgets/ruqolaloginwidget.cpp b/src/widgets/ruqolaloginwidget.cpp new file mode 100644 index 00000000..f64d23fe --- /dev/null +++ b/src/widgets/ruqolaloginwidget.cpp @@ -0,0 +1,37 @@ +/* + Copyright (c) 2020 Laurent Montel + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2 of the License or + ( at your option ) version 3 or, at the discretion of KDE e.V. + ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "ruqolaloginwidget.h" +#include +#include + +RuqolaLoginWidget::RuqolaLoginWidget(QWidget *parent) + : QWidget(parent) +{ + QVBoxLayout *mainLayout = new QVBoxLayout(this); + mainLayout->setObjectName(QStringLiteral("mainLayout")); + mainLayout->setContentsMargins(0, 0, 0, 0); + +} + +RuqolaLoginWidget::~RuqolaLoginWidget() +{ + +} diff --git a/src/widgets/ruqolaloginwidget.h b/src/widgets/ruqolaloginwidget.h new file mode 100644 index 00000000..f49d9fe5 --- /dev/null +++ b/src/widgets/ruqolaloginwidget.h @@ -0,0 +1,35 @@ +/* + Copyright (c) 2020 Laurent Montel + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2 of the License or + ( at your option ) version 3 or, at the discretion of KDE e.V. + ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version. + + This library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + + +#ifndef RUQOLALOGINWIDGET_H +#define RUQOLALOGINWIDGET_H + +#include +#include "libruqolawidgets_private_export.h" +class LIBRUQOLAWIDGETS_EXPORT RuqolaLoginWidget : public QWidget +{ + Q_OBJECT +public: + explicit RuqolaLoginWidget(QWidget *parent = nullptr); + ~RuqolaLoginWidget(); +}; + +#endif // RUQOLALOGINWIDGET_H