Add Qt Button to save Khoj configuration in Khoj Configuration Window

This commit is contained in:
Debanjum Singh Solanky 2022-08-09 20:39:49 +03:00
parent 2c77caf06c
commit cd59982c9c

View file

@ -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"))