Compare commits

..

10 Commits

11 changed files with 30 additions and 38 deletions

4
.gitmodules vendored
View File

@ -1,6 +1,6 @@
[submodule "cmake/backbone"]
path = cmake/backbone
url = git@git.backbone.ws:make/cmake-backbone-modules.git
url = https://git.backbone.ws/kolan/cmake.backbone.git
[submodule "util/backbone-utils"]
path = util/backbone
url = git@git.backbone.ws:make/cmake-backbone-utils.git
url = https://git.backbone.ws/kolan/cmake.backbone-utils.git

@ -1 +1 @@
Subproject commit 9ba1995060ebb1c65ac9855e3671b3992c859059
Subproject commit 206751e1f4814716d716f6bc297c280d4bf1dcf7

View File

@ -102,7 +102,6 @@ namespace CairoChart {
// TODO: check format
_format = value;
}
default = "%.2Lf";
}
/**
@ -114,7 +113,6 @@ namespace CairoChart {
// TODO: check format
_date_format = value;
}
default = "%Y.%m.%d";
}
/**
@ -126,7 +124,6 @@ namespace CairoChart {
// TODO: check format
_time_format = value;
}
default = "%H:%M:%S";
}
/**
@ -140,7 +137,6 @@ namespace CairoChart {
// TODO: check format
_dsec_signs = value;
}
default = 2;
}
/**

View File

@ -9,8 +9,7 @@ CONFIGURE_FILE ( "${CMAKE_SOURCE_DIR}/cmake/backbone/templates/library_construct
INCLUDE_DIRECTORIES ("${CMAKE_SOURCE_DIR}/src")
SET (LibCustomVapis ${CMAKE_SOURCE_DIR}/src/cairo-chart-float128type.vapi)
INCLUDE (ValaLibCommonRules)
INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/cairo-chart-float128type.h DESTINATION include
RENAME cairo-chart-float128type-${MAJOR}.h)
INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/cairo-chart-float128type-${MAJOR}.h DESTINATION include)
INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/cairo-chart-float128type.vapi DESTINATION share/vala/vapi
RENAME cairo-chart-float128type-${MAJOR}.vapi)
CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/cairo-chart.deps.in

View File

@ -96,7 +96,6 @@ namespace CairoChart {
public virtual Color color {
protected get { return Color(); }
set { ctx.set_source_rgba (value.red, value.green, value.blue, value.alpha); }
default = Color();
}
/**

View File

@ -83,7 +83,7 @@ namespace CairoChart {
*/
public Cursors copy () {
var c = new Cursors (chart);
c.list = list.copy();
//c.list = list.copy();
c.active_cursor = active_cursor;
c.is_cursor_active = is_cursor_active;
c.style = style;

View File

@ -51,7 +51,6 @@ namespace CairoChart {
set {
vspacing = hspacing = value;
}
default = 2;
}
/**

View File

@ -77,7 +77,6 @@ namespace CairoChart {
axis_x.grid_style.color.green = axis_y.grid_style.color.green = value.green;
axis_x.grid_style.color.blue = axis_y.grid_style.color.blue = value.blue;
}
default = Color (0, 0, 0, 1);
}
/**

View File

@ -3,12 +3,12 @@ namespace CairoChart {
/**
* 128-bit float type.
*/
[CCode (cname = "cairo_chart_float128", has_type_id = false, cheader_filename = "cairo-chart-float128type.h")]
[CCode (cname = "cairo_chart_float128", has_type_id = false, cheader_filename = "cairo-chart-float128type-0.h")]
public struct Float128 : double {}
/**
* Long Double float type.
*/
[CCode (cname = "cairo_chart_long_double", has_type_id = false, cheader_filename = "cairo-chart-float128type.h")]
[CCode (cname = "cairo_chart_long_double", has_type_id = false, cheader_filename = "cairo-chart-float128type-0.h")]
public struct LongDouble : double {}
}

View File

@ -300,7 +300,7 @@ int main (string[] args) {
var radio_button8 = new RadioButton.with_label_from_widget (radio_button7, "Horizontal Cursors");
button1.clicked.connect (() => {
chart = chart1; da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
chart = chart1; da.queue_draw();
switch (chart.legend.position) {
case Legend.Position.TOP: radio_button1.set_active(true); break;
case Legend.Position.RIGHT: radio_button2.set_active(true); break;
@ -313,7 +313,7 @@ int main (string[] args) {
}
});
button2.clicked.connect (() => {
chart = chart2; da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
chart = chart2; da.queue_draw();
switch (chart.legend.position) {
case Legend.Position.TOP: radio_button1.set_active(true); break;
case Legend.Position.RIGHT: radio_button2.set_active(true); break;
@ -326,7 +326,7 @@ int main (string[] args) {
}
});
button3.clicked.connect (() => {
chart = chart3; da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
chart = chart3; da.queue_draw();
switch (chart.legend.position) {
case Legend.Position.TOP: radio_button1.set_active(true); break;
case Legend.Position.RIGHT: radio_button2.set_active(true); break;
@ -339,7 +339,7 @@ int main (string[] args) {
}
});
button4.clicked.connect (() => {
chart = chart4; da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
chart = chart4; da.queue_draw();
switch (chart.legend.position) {
case Legend.Position.TOP: radio_button1.set_active(true); break;
case Legend.Position.RIGHT: radio_button2.set_active(true); break;
@ -357,7 +357,7 @@ int main (string[] args) {
s.axis_x.title.text = "";
s.axis_y.title.text = "";
}
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
});
button6.clicked.connect (() => {
for (var i = 0; i < chart.series.length; ++i) {
@ -365,7 +365,7 @@ int main (string[] args) {
s.axis_x.date_format = "%Y.%m.%d";
s.axis_x.time_format = "";
}
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
});
button7.clicked.connect (() => {
@ -374,7 +374,7 @@ int main (string[] args) {
s.axis_x.date_format = "";
s.axis_x.time_format = "%H:%M:%S";
}
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
});
button8.clicked.connect (() => {
@ -383,32 +383,32 @@ int main (string[] args) {
s.axis_x.date_format = "%Y.%m.%d";
s.axis_x.time_format = "%H:%M:%S";
}
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
});
radio_button1.toggled.connect ((button) => {
if (button.get_active()) {
chart.legend.position = Legend.Position.TOP;
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
}
});
radio_button2.toggled.connect ((button) => {
if (button.get_active()) {
chart.legend.position = Legend.Position.RIGHT;
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
}
});
radio_button3.toggled.connect ((button) => {
if (button.get_active()) {
chart.legend.position = Legend.Position.LEFT;
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
}
});
radio_button4.toggled.connect ((button) => {
if (button.get_active()) {
chart.legend.position = Legend.Position.BOTTOM;
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
}
});
@ -418,26 +418,26 @@ int main (string[] args) {
radio_button5.toggled.connect ((button) => {
// TODO: set labels
if (button.get_active()) {
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
}
});
radio_button6.toggled.connect ((button) => {
// TODO: set cursors
if (button.get_active()) {
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
}
});*/
radio_button7.toggled.connect ((button) => {
if (button.get_active()) {
chart.cursors.style.orientation = Cursors.Orientation.VERTICAL;
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
}
});
radio_button8.toggled.connect ((button) => {
if (button.get_active()) {
chart.cursors.style.orientation = Cursors.Orientation.HORIZONTAL;
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
}
});
@ -494,7 +494,7 @@ int main (string[] args) {
chart.cursors.set_active (Point(event.x, event.y));
mouse_state = MouseState.CURSOR_SELECTION;
}
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
break;
case 2: // start zoom area selection
@ -520,7 +520,7 @@ int main (string[] args) {
case 1: // start cursor position selection
if ((event.state & Gdk.ModifierType.SHIFT_MASK) != 0) { // remove cursor
//chart.remove_active ();
//da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
//da.queue_draw();
//mouse_state = MouseState.FREE;
} else { // add cursor
chart.cursors.add_active ();
@ -535,7 +535,7 @@ int main (string[] args) {
chart.zoom_in (new Area.with_abs(sel_x0, sel_y0, sel_x1, sel_y1));
else
chart.zoom_out ();
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
mouse_state = MouseState.FREE;
break;
@ -553,7 +553,7 @@ int main (string[] args) {
case MouseState.DRAW_SELECTION:
sel_x1 = event.x;
sel_y1 = event.y;
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
break;
case MouseState.MOVING_CHART:
@ -561,12 +561,12 @@ int main (string[] args) {
chart.move (Point(){x = delta_x, y = delta_y});
mov_x0 = event.x;
mov_y0 = event.y;
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
break;
case MouseState.CURSOR_SELECTION:
chart.cursors.set_active (Point(event.x, event.y));
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
break;
}
@ -581,7 +581,7 @@ int main (string[] args) {
chart.zoom_scroll_out(Point(event.x, event.y));
break;
}
da.queue_draw_area(0, 0, da.get_allocated_width(), da.get_allocated_height());
da.queue_draw();
//var ret = chart.scroll_notify_event(event);
return true; // return ret;