#ifndef FILTER_GUI_C #define FILTER_GUI_C #include #include #include #include #include #include #include class FilterGui { private: QTableWidget* widget; int filter_size; void updateGui() { this->widget->setRowCount(this->filter_size); this->widget->setColumnCount(this->filter_size); for(int i=0; ifilter_size; i++) { for(int j=0; jfilter_size; j++) { this->widget->setItem(i, j, new QTableWidgetItem("0")); } } }; public: FilterGui(int filter_size = 3) { this->widget = new QTableWidget(); this->setSize(filter_size); }; ~FilterGui() { delete this->widget; this->widget = NULL; }; QTableWidget* getWidget() { return this->widget; }; void setSize(int size) { this->filter_size = size; this->updateGui(); }; int getSize() { return this->filter_size; }; }; #endif