Improve Docstring for Configure Screen and System Tray class, funcs

This commit is contained in:
Debanjum Singh Solanky
2022-08-11 23:36:02 +03:00
parent da5284bbda
commit 41520e1608
2 changed files with 9 additions and 10 deletions

View File

@@ -17,9 +17,9 @@ from src.utils.helpers import merge_dicts
class ConfigureScreen(QtWidgets.QDialog): class ConfigureScreen(QtWidgets.QDialog):
"""Create Window to Configure Khoj """Create Window to Configure Khoj
Allow user to Allow user to
1. Enable/Disable search on 1. org-mode, 2. markdown, 3. beancount or 4. image content types 1. Configure content types to search
2. Configure the server host and port 2. Configure conversation processor
3. Save the configuration to khoj.yml and start the server 3. Save the configuration to khoj.yml
""" """
def __init__(self, config_file: Path, parent=None): def __init__(self, config_file: Path, parent=None):
@@ -202,7 +202,7 @@ class ConfigureScreen(QtWidgets.QDialog):
return True return True
def load_updated_settings(self): def load_updated_settings(self):
"Hot swap to using the updated config from file" "Hot swap to use the updated config from config file"
# Load parsed, validated config from app config file # Load parsed, validated config from app config file
args = cli(state.cli_args) args = cli(state.cli_args)
self.current_config = self.new_config self.current_config = self.new_config
@@ -230,6 +230,7 @@ class ProcessorCheckBox(QtWidgets.QCheckBox):
self.processor_type = processor_type self.processor_type = processor_type
super(ProcessorCheckBox, self).__init__(text, parent=parent) super(ProcessorCheckBox, self).__init__(text, parent=parent)
class ProcessorLineEdit(QtWidgets.QLineEdit): class ProcessorLineEdit(QtWidgets.QLineEdit):
def __init__(self, text, processor_type: ProcessorType, parent=None): def __init__(self, text, processor_type: ProcessorType, parent=None):
self.processor_type = processor_type self.processor_type = processor_type

View File

@@ -9,11 +9,10 @@ from src.utils import constants
def create_system_tray(gui: QtWidgets.QApplication, configure_screen: QtWidgets.QDialog): def create_system_tray(gui: QtWidgets.QApplication, configure_screen: QtWidgets.QDialog):
"""Create System Tray with Menu """Create System Tray with Menu. Menu contain options to
Menu Actions should contain 1. Open Search Page on the Web Interface
1. option to open search page at localhost:8000/ 2. Open App Configuration Screen
2. option to open config screen 3. Quit Application
3. to quit
""" """
# Create the system tray with icon # Create the system tray with icon
@@ -40,4 +39,3 @@ def create_system_tray(gui: QtWidgets.QApplication, configure_screen: QtWidgets.
tray.setContextMenu(menu) tray.setContextMenu(menu)
return tray return tray