mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/shared] HideableEvenOddCell
This commit is contained in:
@@ -21,6 +21,7 @@ app_objs += $(addprefix apps/shared/,\
|
||||
function_expression_cell.o\
|
||||
function_title_cell.o\
|
||||
go_to_parameter_controller.o\
|
||||
hideable_even_odd_cell.o\
|
||||
hideable_even_odd_editable_text_cell.o\
|
||||
initialisation_parameter_controller.o\
|
||||
interactive_curve_view_controller.o\
|
||||
|
||||
19
apps/shared/hideable_even_odd_cell.cpp
Normal file
19
apps/shared/hideable_even_odd_cell.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "hideable_even_odd_cell.h"
|
||||
|
||||
namespace Shared {
|
||||
|
||||
KDColor HideableEvenOddCell::backgroundColor() const {
|
||||
if (hidden()) {
|
||||
return hideColor();
|
||||
}
|
||||
return EvenOddCell::backgroundColor();
|
||||
}
|
||||
|
||||
void HideableEvenOddCell::setHide(bool hide) {
|
||||
if (hidden() != hide) {
|
||||
Hideable::setHide(hide);
|
||||
reloadCell();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
21
apps/shared/hideable_even_odd_cell.h
Normal file
21
apps/shared/hideable_even_odd_cell.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef APPS_SHARED_HIDEABLE_EVEN_ODD_CELL_H
|
||||
#define APPS_SHARED_HIDEABLE_EVEN_ODD_CELL_H
|
||||
|
||||
#include <escher/even_odd_cell.h>
|
||||
#include "hideable.h"
|
||||
|
||||
namespace Shared {
|
||||
|
||||
class HideableEvenOddCell : public EvenOddCell, public Hideable {
|
||||
public:
|
||||
HideableEvenOddCell() :
|
||||
EvenOddCell(),
|
||||
Hideable()
|
||||
{}
|
||||
KDColor backgroundColor() const override;
|
||||
void setHide(bool hide) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user