From 775810f943f7f6540d3bb180fdb91a074fdbaa75 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Feb 2014 16:54:00 +0300 Subject: Move extendedlistmodel into gui/models directory. --- src/CMakeLists.txt | 2 +- src/Makefile.am | 2 +- src/gui/models/extendedlistmodel.h | 34 ++++++++++++++++++++++++++++++++++ src/gui/widgets/dropdown.cpp | 3 ++- src/gui/widgets/extendedlistbox.cpp | 2 +- src/gui/widgets/extendedlistmodel.h | 34 ---------------------------------- src/gui/widgets/extendednamesmodel.h | 2 +- src/gui/widgets/tabs/setup_theme.cpp | 3 ++- src/gui/windows/npcdialog.h | 3 ++- 9 files changed, 44 insertions(+), 41 deletions(-) create mode 100644 src/gui/models/extendedlistmodel.h delete mode 100644 src/gui/widgets/extendedlistmodel.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d2d7effde..72bff6ee1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -138,7 +138,7 @@ SET(SRCS gui/widgets/emoteshortcutcontainer.h gui/widgets/extendedlistbox.cpp gui/widgets/extendedlistbox.h - gui/widgets/extendedlistmodel.h + gui/models/extendedlistmodel.h gui/widgets/extendednamesmodel.cpp gui/widgets/extendednamesmodel.h gui/widgets/flowcontainer.cpp diff --git a/src/Makefile.am b/src/Makefile.am index b06506604..2179818d7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -234,7 +234,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \ gui/widgets/emoteshortcutcontainer.h \ gui/widgets/extendedlistbox.cpp \ gui/widgets/extendedlistbox.h \ - gui/widgets/extendedlistmodel.h \ + gui/models/extendedlistmodel.h \ gui/widgets/extendednamesmodel.cpp \ gui/widgets/extendednamesmodel.h \ gui/widgets/flowcontainer.cpp \ diff --git a/src/gui/models/extendedlistmodel.h b/src/gui/models/extendedlistmodel.h new file mode 100644 index 000000000..5d859e781 --- /dev/null +++ b/src/gui/models/extendedlistmodel.h @@ -0,0 +1,34 @@ +/* + * The ManaPlus Client + * Copyright (C) 2012-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * 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 . + */ + +#ifndef GUI_MODELS_EXTENDEDLISTMODEL_H +#define GUI_MODELS_EXTENDEDLISTMODEL_H + +#include "resources/image.h" + +#include "gui/models/listmodel.h" + +class ExtendedListModel : public ListModel +{ + public: + virtual const Image *getImageAt(int i) A_WARN_UNUSED = 0; +}; + +#endif // GUI_MODELS_EXTENDEDLISTMODEL_H diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index ec9a2e22f..763cf47a5 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -28,7 +28,8 @@ #include "input/keydata.h" -#include "gui/widgets/extendedlistmodel.h" +#include "gui/models/extendedlistmodel.h" + #include "gui/widgets/popuplist.h" #include "resources/image.h" diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp index c507f986c..13fb70f28 100644 --- a/src/gui/widgets/extendedlistbox.cpp +++ b/src/gui/widgets/extendedlistbox.cpp @@ -20,7 +20,7 @@ #include "gui/widgets/extendedlistbox.h" -#include "gui/widgets/extendedlistmodel.h" +#include "gui/models/extendedlistmodel.h" #include "gui/font.h" diff --git a/src/gui/widgets/extendedlistmodel.h b/src/gui/widgets/extendedlistmodel.h deleted file mode 100644 index c3cd26b90..000000000 --- a/src/gui/widgets/extendedlistmodel.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2012-2014 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * 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 - * any later version. - * - * 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 . - */ - -#ifndef GUI_WIDGETS_EXTENDEDLISTMODEL_H -#define GUI_WIDGETS_EXTENDEDLISTMODEL_H - -#include "resources/image.h" - -#include "gui/models/listmodel.h" - -class ExtendedListModel : public ListModel -{ - public: - virtual const Image *getImageAt(int i) A_WARN_UNUSED = 0; -}; - -#endif // GUI_WIDGETS_EXTENDEDLISTMODEL_H diff --git a/src/gui/widgets/extendednamesmodel.h b/src/gui/widgets/extendednamesmodel.h index 93e87cfa0..3c38c48ed 100644 --- a/src/gui/widgets/extendednamesmodel.h +++ b/src/gui/widgets/extendednamesmodel.h @@ -23,7 +23,7 @@ #include "utils/stringvector.h" -#include "gui/widgets/extendedlistmodel.h" +#include "gui/models/extendedlistmodel.h" class ExtendedNamesModel : public ExtendedListModel { diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp index 1d5f0f910..8d5b234e1 100644 --- a/src/gui/widgets/tabs/setup_theme.cpp +++ b/src/gui/widgets/tabs/setup_theme.cpp @@ -26,9 +26,10 @@ #include "gui/windows/okdialog.h" +#include "gui/models/extendedlistmodel.h" + #include "gui/widgets/button.h" #include "gui/widgets/dropdown.h" -#include "gui/widgets/extendedlistmodel.h" #include "gui/widgets/label.h" #include "gui/widgets/layouthelper.h" #include "gui/widgets/namesmodel.h" diff --git a/src/gui/windows/npcdialog.h b/src/gui/windows/npcdialog.h index b9fa1aab8..5188c2fe2 100644 --- a/src/gui/windows/npcdialog.h +++ b/src/gui/windows/npcdialog.h @@ -25,7 +25,8 @@ #include "listeners/configlistener.h" -#include "gui/widgets/extendedlistmodel.h" +#include "gui/models/extendedlistmodel.h" + #include "gui/widgets/window.h" #include "utils/stringvector.h" -- cgit v1.2.3-60-g2f50