|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2013 - 2021 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a dialog to enter the sort options for a line sort. |
|
8 """ |
|
9 |
|
10 from PyQt5.QtWidgets import QDialog |
|
11 |
|
12 from .Ui_SortOptionsDialog import Ui_SortOptionsDialog |
|
13 |
|
14 |
|
15 class SortOptionsDialog(QDialog, Ui_SortOptionsDialog): |
|
16 """ |
|
17 Class implementing a dialog to enter the sort options for a line sort. |
|
18 """ |
|
19 def __init__(self, parent=None): |
|
20 """ |
|
21 Constructor |
|
22 |
|
23 @param parent reference to the parent widget (QWidget) |
|
24 """ |
|
25 super().__init__(parent) |
|
26 self.setupUi(self) |
|
27 |
|
28 msh = self.minimumSizeHint() |
|
29 self.resize(max(self.width(), msh.width()), msh.height()) |
|
30 |
|
31 def getData(self): |
|
32 """ |
|
33 Public method to get the selected options. |
|
34 |
|
35 @return tuple of three flags indicating ascending order, alphanumeric |
|
36 sort and case sensitivity (tuple of three boolean) |
|
37 """ |
|
38 return ( |
|
39 self.ascendingButton.isChecked(), |
|
40 self.alnumButton.isChecked(), |
|
41 self.respectCaseButton.isChecked() |
|
42 ) |