aboutsummaryrefslogtreecommitdiff
path: root/src/gui/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/tasks')
-rw-r--r--src/gui/tasks/form/widget.py10
-rw-r--r--src/gui/tasks/table/menu.py4
-rw-r--r--src/gui/tasks/table/model.py16
-rw-r--r--src/gui/tasks/widget.py4
4 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/tasks/form/widget.py b/src/gui/tasks/form/widget.py
index 846ce90..adaf757 100644
--- a/src/gui/tasks/form/widget.py
+++ b/src/gui/tasks/form/widget.py
@@ -4,7 +4,7 @@ from typing import Optional, Tuple, List, Any
import db.tasks
from model.task import Task, ValidTaskForm
from model import difficulty, priority
-import gui.icons
+import gui.icon
import gui.tasks.form.state
import gui.tasks.duration
@@ -45,7 +45,7 @@ def widget(
init_tag = task.tag if task is not None else ''
tag_input = line_edit(grid, grid_layout, 2, 'Tag', init_tag)
- init_difficulty = task.difficulty if task is not None else difficulty.Difficulty.MEDIUM
+ init_difficulty = task.difficulty if task is not None else difficulty.Difficulty.NORMAL
difficulty_input = combo_box(
grid,
grid_layout,
@@ -54,7 +54,7 @@ def widget(
[difficulty.format(d) for d in difficulty.values],
int(init_difficulty))
- init_priority = task.priority if task is not None else priority.Priority.MEDIUM
+ init_priority = task.priority if task is not None else priority.Priority.MIDDLE
priority_input = combo_box(
grid,
grid_layout,
@@ -160,7 +160,7 @@ def buttons(parent, action_title, task_form_signal, on_validate, on_cancel):
validate = QtWidgets.QPushButton(action_title, widget)
validate.setDisabled(True)
- validate.setIcon(gui.icons.dialog_apply(validate.style()))
+ validate.setIcon(gui.icon.dialog_apply(validate.style()))
validate.clicked.connect(on_validate);
layout.addWidget(validate)
@@ -173,7 +173,7 @@ def buttons(parent, action_title, task_form_signal, on_validate, on_cancel):
task_form_signal.connect(on_task_form_signal)
cancel = QtWidgets.QPushButton('cancel', widget)
- cancel.setIcon(gui.icons.dialog_cancel(cancel.style()))
+ cancel.setIcon(gui.icon.dialog_cancel(cancel.style()))
cancel.clicked.connect(on_cancel)
layout.addWidget(cancel)
diff --git a/src/gui/tasks/table/menu.py b/src/gui/tasks/table/menu.py
index 51f7330..edc9833 100644
--- a/src/gui/tasks/table/menu.py
+++ b/src/gui/tasks/table/menu.py
@@ -10,11 +10,11 @@ def open(database, table, update_task_signal, position):
menu = QtWidgets.QMenu(table)
if len(rows) == 1:
- modify_action = menu.addAction(gui.icons.dialog_open(menu.style()), 'modify')
+ modify_action = menu.addAction(gui.icon.dialog_open(menu.style()), 'modify')
else:
modify_action = QtWidgets.QAction(menu)
- delete_action = menu.addAction(gui.icons.trash(menu.style()), 'Delete')
+ delete_action = menu.addAction(gui.icon.trash(menu.style()), 'Delete')
action = menu.exec_(table.mapToGlobal(position))
if action == modify_action and len(rows) == 1:
diff --git a/src/gui/tasks/table/model.py b/src/gui/tasks/table/model.py
index 5013569..062ded6 100644
--- a/src/gui/tasks/table/model.py
+++ b/src/gui/tasks/table/model.py
@@ -139,17 +139,17 @@ def is_reversed(row: int, order: Qt.SortOrder) -> bool:
return order == Qt.DescendingOrder
def difficulty_color(d: Difficulty) -> QtGui.QColor:
- if d == Difficulty.LOW:
- return gui.color.low_difficulty
- elif d == Difficulty.MEDIUM:
- return gui.color.medium_difficulty
- elif d == Difficulty.HIGH:
- return gui.color.high_difficulty
+ if d == Difficulty.EASY:
+ return gui.color.easy_difficulty
+ elif d == Difficulty.NORMAL:
+ return gui.color.normal_difficulty
+ elif d == Difficulty.HARD:
+ return gui.color.hard_difficulty
def priority_color(p: Priority) -> QtGui.QColor:
if p == Priority.LOW:
return gui.color.low_priority
- elif p == Priority.MEDIUM:
- return gui.color.medium_priority
+ elif p == Priority.MIDDLE:
+ return gui.color.middle_priority
elif p == Priority.HIGH:
return gui.color.high_priority
diff --git a/src/gui/tasks/widget.py b/src/gui/tasks/widget.py
index 0462f54..61ad605 100644
--- a/src/gui/tasks/widget.py
+++ b/src/gui/tasks/widget.py
@@ -2,7 +2,7 @@ from PyQt5 import QtWidgets, QtCore
import gui.tasks.signal
import gui.tasks.table.widget
-import gui.icons
+import gui.icon
from model.task import ValidTaskForm
def widget(database, parent):
@@ -14,7 +14,7 @@ def widget(database, parent):
add_task_signal = gui.tasks.signal.AddTask()
add_task_button = QtWidgets.QPushButton('Add a task', widget)
- add_task_button.setIcon(gui.icons.new_folder(widget.style()))
+ add_task_button.setIcon(gui.icon.new_folder(widget.style()))
add_task_button.clicked.connect(lambda: gui.tasks.dialog.add(
database, widget, add_task_signal).exec_())
layout.addWidget(add_task_button)