# Form implementation generated from reading ui file '/home/kovid/work/calibre/src/calibre/gui2/dialogs/choose_library.ui'
#
# Created by: PyQt6 UI code generator 6.5.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt6 import QtCore, QtGui, QtWidgets


class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(602, 245)
        icon = QtGui.QIcon.ic("lt.png")
        Dialog.setWindowIcon(icon)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setObjectName("gridLayout")
        self.old_location = QtWidgets.QLabel(parent=Dialog)
        self.old_location.setWordWrap(True)
        self.old_location.setObjectName("old_location")
        self.gridLayout.addWidget(self.old_location, 0, 0, 1, 4)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
        self.gridLayout.addItem(spacerItem, 8, 2, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
        self.gridLayout.addItem(spacerItem1, 1, 0, 1, 1)
        self.browse_button = QtWidgets.QToolButton(parent=Dialog)
        icon1 = QtGui.QIcon.ic("document_open.png")
        self.browse_button.setIcon(icon1)
        self.browse_button.setObjectName("browse_button")
        self.gridLayout.addWidget(self.browse_button, 2, 3, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 9, 2, 1, 1)
        self.existing_library = QtWidgets.QRadioButton(parent=Dialog)
        self.existing_library.setChecked(True)
        self.existing_library.setObjectName("existing_library")
        self.gridLayout.addWidget(self.existing_library, 5, 0, 1, 4)
        self.hbox1 = QtWidgets.QHBoxLayout()
        self.hbox1.setObjectName("hbox1")
        self.empty_library = QtWidgets.QRadioButton(parent=Dialog)
        self.empty_library.setObjectName("empty_library")
        self.hbox1.addWidget(self.empty_library)
        self.copy_structure = QtWidgets.QCheckBox(parent=Dialog)
        self.copy_structure.setObjectName("copy_structure")
        self.hbox1.addWidget(self.copy_structure)
        self.gridLayout.addLayout(self.hbox1, 6, 0, 1, 3)
        self.move_library = QtWidgets.QRadioButton(parent=Dialog)
        self.move_library.setObjectName("move_library")
        self.gridLayout.addWidget(self.move_library, 7, 0, 1, 3)
        self.location = HistoryLineEdit(parent=Dialog)
        self.location.setSizeAdjustPolicy(QtWidgets.QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLengthWithIcon)
        self.location.setMinimumContentsLength(40)
        self.location.setObjectName("location")
        self.gridLayout.addWidget(self.location, 2, 1, 1, 2)
        spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
        self.gridLayout.addItem(spacerItem2, 3, 0, 1, 1)
        self.label_2 = QtWidgets.QLabel(parent=Dialog)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
        self.nas_warning = QtWidgets.QLabel(parent=Dialog)
        self.nas_warning.setObjectName("nas_warning")
        self.gridLayout.addWidget(self.nas_warning, 4, 0, 1, 4)
        self.label_2.setBuddy(self.location)

        self.retranslateUi(Dialog)
        self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
        self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):

        Dialog.setWindowTitle(_("Choose your calibre library"))
        self.old_location.setText(_("Your calibre library is currently located at {0}"))
        self.browse_button.setText(_("..."))
        self.existing_library.setText(_("Use a previously &existing library at the chosen new location"))
        self.empty_library.setText(_("&Create an empty library at the new location"))
        self.copy_structure.setToolTip(_("Copy the custom columns, saved searches, column widths, plugboards,\n"
"user categories, and other information from the old to the new library"))
        self.copy_structure.setText(_("&Copy structure from the current library"))
        self.move_library.setText(_("&Move the current library to new location"))
        self.label_2.setText(_("New &location:"))
        self.nas_warning.setText(_("Note that putting the calibre library on a Networked drive <a href=\"{}\">is not safe</a>."))
from calibre.gui2.widgets import HistoryLineEdit
