rename background delegate of layouts editor

pull/19/head
Michail Vourlakos
parent 39fb0df8dc
commit 72fa5cdd9c

@ -26,7 +26,7 @@
#include "../dialogs/settingsdialog.h"
#include "../data/uniqueidinfo.h"
#include "../delegates/activitiesdelegate.h"
#include "../delegates/backgroundcmbdelegate.h"
#include "../delegates/backgrounddelegate.h"
#include "../delegates/checkboxdelegate.h"
#include "../delegates/layoutnamedelegate.h"
#include "../delegates/shareddelegate.h"
@ -147,7 +147,7 @@ void Layouts::initView()
}
m_view->setItemDelegateForColumn(Model::Layouts::NAMECOLUMN, new Settings::Layout::Delegate::LayoutName(this));
m_view->setItemDelegateForColumn(Model::Layouts::BACKGROUNDCOLUMN, new Settings::Layout::Delegate::BackgroundCmbBox(this));
m_view->setItemDelegateForColumn(Model::Layouts::BACKGROUNDCOLUMN, new Settings::Layout::Delegate::BackgroundDelegate(this));
m_view->setItemDelegateForColumn(Model::Layouts::MENUCOLUMN, new Settings::Layout::Delegate::CheckBox(this));
m_view->setItemDelegateForColumn(Model::Layouts::BORDERSCOLUMN, new Settings::Layout::Delegate::CheckBox(this));
m_view->setItemDelegateForColumn(Model::Layouts::ACTIVITYCOLUMN, new Settings::Layout::Delegate::Activities(this));

@ -2,7 +2,7 @@ set(lattedock-app_SRCS
${lattedock-app_SRCS}
${CMAKE_CURRENT_SOURCE_DIR}/activitiesdelegate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/colorcmbitemdelegate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/backgroundcmbdelegate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/backgrounddelegate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/checkboxdelegate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/layoutnamedelegate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/shareddelegate.cpp

@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "backgroundcmbdelegate.h"
#include "backgrounddelegate.h"
// local
#include "../models/layoutsmodel.h"
@ -37,12 +37,12 @@ namespace Delegate {
const int MARGIN = 2;
BackgroundCmbBox::BackgroundCmbBox(QObject *parent)
BackgroundDelegate::BackgroundDelegate(QObject *parent)
: QStyledItemDelegate(parent)
{
}
void BackgroundCmbBox::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
void BackgroundDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
QStyleOptionViewItem myOptions = option;
//! Remove the focus dotted lines
@ -77,7 +77,7 @@ void BackgroundCmbBox::paint(QPainter *painter, const QStyleOptionViewItem &opti
}
}
void BackgroundCmbBox::drawIcon(QPainter *painter, const QStyleOptionViewItem &option, const QRect &target, const Data::LayoutIcon &icon) const
void BackgroundDelegate::drawIcon(QPainter *painter, const QStyleOptionViewItem &option, const QRect &target, const Data::LayoutIcon &icon) const
{
bool active = Latte::isActive(option);
bool selected = Latte::isSelected(option);

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BACKGROUNDCMBBOXDELEGATE_H
#define BACKGROUNDCMBBOXDELEGATE_H
#ifndef LAYOUTBACKGROUNDDELEGATE_H
#define LAYOUTBACKGROUNDDELEGATE_H
// local
#include "../data/layouticondata.h"
@ -34,11 +34,11 @@ namespace Settings {
namespace Layout {
namespace Delegate {
class BackgroundCmbBox : public QStyledItemDelegate
class BackgroundDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
BackgroundCmbBox(QObject *parent = 0);
BackgroundDelegate(QObject *parent = 0);
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
Loading…
Cancel
Save