From cd59982c9cccf01cd9d185f3ec87fdc590c87143 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Tue, 9 Aug 2022 20:39:49 +0300 Subject: [PATCH] Add Qt Button to save Khoj configuration in Khoj Configuration Window --- src/main.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.py b/src/main.py index eab575da..a7c7a38a 100644 --- a/src/main.py +++ b/src/main.py @@ -108,6 +108,13 @@ class ConfigureWindow(QtWidgets.QMainWindow): self.ledger_layout.addWidget(enable_ledger_search) self.layout.addWidget(ledger_settings) + # Button to Save Settings + action_bar = QtWidgets.QWidget() + action_bar_layout = QtWidgets.QHBoxLayout(action_bar) + save_button = QtWidgets.QPushButton("Start", clicked=self.save_settings) + action_bar_layout.addWidget(save_button) + self.layout.addWidget(action_bar) + # Set the central widget of the Window. Widget will expand # to take up all the space in the window by default. self.config_window = QtWidgets.QWidget() @@ -115,6 +122,10 @@ class ConfigureWindow(QtWidgets.QMainWindow): self.setCentralWidget(self.config_window) + def save_settings(self, s): + # Save the settings to khoj.yml + pass + def show_orgmode_search_options(self, s): if Qt.CheckState(s) == Qt.CheckState.Checked: self.orgmode_layout.layout().addWidget(QtWidgets.QLabel("Search Org-Mode Files"))