-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
32 lines (21 loc) · 905 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
__copyright__ = '2018, BookFusion <[email protected]>'
__license__ = 'GPL v3'
from PyQt5.Qt import QDialog, QLayout, QVBoxLayout
from calibre_plugins.bookfusion.sync import SyncWidget
from calibre_plugins.bookfusion.intro import IntroWidget
class MainDialog(QDialog):
def __init__(self, gui, do_user_config, selected_book_ids, is_sync_selected):
QDialog.__init__(self, gui)
self.gui = gui
self.setWindowTitle('BookFusion Sync')
self.l = QVBoxLayout()
self.l.setSizeConstraint(QLayout.SetFixedSize)
self.setLayout(self.l)
self.intro = IntroWidget(gui)
self.l.addWidget(self.intro)
self.sync = SyncWidget(gui, do_user_config, selected_book_ids, is_sync_selected)
self.l.addWidget(self.sync)
self.adjustSize()
def reject(self):
if self.sync.maybe_cancel():
QDialog.reject(self)