|
|
|
@ -9,7 +9,8 @@ from clusterview.colors import Color
|
|
|
|
|
from clusterview.mode import Mode |
|
|
|
|
from clusterview.mode_handlers import (group, MODE_HANDLER_MAP, |
|
|
|
|
ogl_keypress_handler, |
|
|
|
|
refresh_point_list) |
|
|
|
|
refresh_point_list, |
|
|
|
|
reset_centroid_count_and_colors) |
|
|
|
|
from clusterview.opengl_widget import (clear_selection, initialize_gl, |
|
|
|
|
mouse_leave, paint_gl, resize_gl, |
|
|
|
|
set_drawing_context) |
|
|
|
@ -67,8 +68,11 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|
|
|
|
self)) |
|
|
|
|
|
|
|
|
|
self.choose_centroids_button.clicked.connect(self.__choose_centroids) |
|
|
|
|
|
|
|
|
|
self.group_button.clicked.connect(self.__group) |
|
|
|
|
|
|
|
|
|
self.reset_button.clicked.connect(self.__reset_grouping) |
|
|
|
|
|
|
|
|
|
# ----------------------------------------------- |
|
|
|
|
# OpenGL Graphics Handlers are set |
|
|
|
|
# here and defined in clusterview.opengl_widget. |
|
|
|
@ -159,6 +163,16 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|
|
|
|
self.__off_mode() |
|
|
|
|
self.opengl_widget.update() |
|
|
|
|
|
|
|
|
|
def __reset_grouping(self): |
|
|
|
|
self.__off_mode() |
|
|
|
|
self.number_of_centroids.setEnabled(True) |
|
|
|
|
self.number_of_centroids.setValue(0) |
|
|
|
|
self.choose_centroids_button.setEnabled(True) |
|
|
|
|
self.solve_button.setEnabled(False) |
|
|
|
|
self.group_button.setEnabled(False) |
|
|
|
|
PointManager.centroids = [] |
|
|
|
|
reset_centroid_count_and_colors() |
|
|
|
|
|
|
|
|
|
@property |
|
|
|
|
def mode(self): |
|
|
|
|
""" |
|
|
|
|