Skip to content

Commit

Permalink
shuffled function around
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerryliu committed May 28, 2017
1 parent 3d7a352 commit e92ec63
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Graph::Graph(const vector<Device::sensor_reading> &sensor_readings,
const unsigned int Graph::get_type() const { return type; }
const unsigned int Graph::get_device_index() const { return device_index; }

void Graph::update_vals(vector<Device::sensor_reading> &sensor_readings) {
this->sensor_readings = sensor_readings;
update();
}

// https://developer.gnome.org/gtkmm-tutorial/stable/chapter-drawingarea.html.en
bool Graph::on_draw(const Cairo::RefPtr<Cairo::Context> &cr) {
Gtk::Allocation allocation = get_allocation();
Expand Down Expand Up @@ -74,11 +79,6 @@ void Graph::check_resize() {
}
}

void Graph::update_vals(vector<Device::sensor_reading> &sensor_readings) {
this->sensor_readings = sensor_readings;
update();
}

void Graph::draw_title(const Cairo::RefPtr<Cairo::Context> &cr) {
const int left_offset = 10;
const int top_offset = 10;
Expand Down

0 comments on commit e92ec63

Please sign in to comment.