Skip to content
Snippets Groups Projects
Commit 7ed5e655 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Refactor default colors

parent 89db9295
No related branches found
No related tags found
1 merge request!1Add Locations and Graph to Navigation Memory and Redesign Location Graph Editor
......@@ -17,6 +17,7 @@ set(SOURCES
GraphScene.cpp
GuiGraph.cpp
widgets/default_colors.cpp
widgets/EdgeTableWidget.cpp
widgets/VertexDataWidget.cpp
widgets/VertexTableWidget.cpp
......@@ -28,6 +29,7 @@ set(HEADERS
GraphScene.h
GuiGraph.h
widgets/default_colors.h
widgets/EdgeTableWidget.h
widgets/VertexDataWidget.h
widgets/VertexTableWidget.h
......
......@@ -22,7 +22,9 @@
#pragma once
#include <armarx/navigation/gui-plugins/LocationGraphEditor/GuiGraph.h>
#include <armarx/navigation/gui-plugins/LocationGraphEditor/widgets/default_colors.h>
#include <QColor>
#include <QTableWidget>
......@@ -48,8 +50,8 @@ namespace armarx::nav::locgrapheditor
public:
QColor bgColorDefault = QColor::fromRgb(255, 255, 255);
QColor bgColorSelected = QColor::fromRgb(0, 128, 255);
QColor bgColorDefault = default_colors::tableBackgroundDefault;
QColor bgColorSelected = default_colors::tableBackgroundSelected;
};
......
......@@ -39,6 +39,8 @@ namespace armarx::nav::locgrapheditor
setSortingEnabled(true);
setContextMenuPolicy(Qt::CustomContextMenu);
setAlternatingRowColors(true);
}
......@@ -59,7 +61,7 @@ namespace armarx::nav::locgrapheditor
for (int col = 1; col <= 3; ++col)
{
item(row, col)->setTextAlignment(Qt::AlignRight);
item(row, col)->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
}
return item(row, 0);
......
......@@ -22,7 +22,9 @@
#pragma once
#include <armarx/navigation/gui-plugins/LocationGraphEditor/GuiGraph.h>
#include <armarx/navigation/gui-plugins/LocationGraphEditor/widgets/default_colors.h>
#include <QColor>
#include <QTableWidget>
......@@ -31,6 +33,7 @@ namespace armarx::nav::locgrapheditor
class VertexTableWidget : public QTableWidget
{
Q_OBJECT
using This = VertexTableWidget;
......@@ -48,8 +51,9 @@ namespace armarx::nav::locgrapheditor
public:
QColor bgColorDefault = QColor::fromRgb(255, 255, 255);
QColor bgColorSelected = QColor::fromRgb(0, 128, 255);
QColor bgColorDefault = default_colors::tableBackgroundDefault;
QColor bgColorSelected = default_colors::tableBackgroundSelected;
};
......
/*
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ArmarX 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 <http://www.gnu.org/licenses/>.
*
* @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
* @date 2021
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#include "default_colors.h"
#include <QColor>
namespace armarx::nav::locgrapheditor
{
const QColor default_colors::tableBackgroundDefault = QColor::fromRgb(255, 255, 255);
const QColor default_colors::tableBackgroundSelected = QColor::fromRgb(128, 196, 255);
}
/*
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ArmarX 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 <http://www.gnu.org/licenses/>.
*
* @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
* @date 2021
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#pragma once
class QColor;
namespace armarx::nav::locgrapheditor::default_colors
{
extern const QColor tableBackgroundDefault;
extern const QColor tableBackgroundSelected;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment