|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2013 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 PyQt4.QtGui 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 def getData(self): |
|
29 """ |
|
30 Public method to get the selected options. |
|
31 |
|
32 @return tuple of three flags indicating ascending order, alphanumeric sort |
|
33 and case sensitivity (tuple of three boolean) |
|
34 """ |
|
35 return ( |
|
36 self.ascendingButton.isChecked(), |
|
37 self.alnumButton.isChecked(), |
|
38 self.respectCaseButton.isChecked() |
|
39 ) |