eric6/QScintilla/SortOptionsDialog.py

Wed, 30 Dec 2020 11:00:05 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Dec 2020 11:00:05 +0100
changeset 7923
91e843545d9a
parent 7781
607a6098cb44
child 8218
7c09585bd960
permissions
-rw-r--r--

Updated copyright for 2021.

2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7923
91e843545d9a Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7781
diff changeset
3 # Copyright (c) 2013 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a dialog to enter the sort options for a line sort.
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
10 from PyQt5.QtWidgets import QDialog
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 from .Ui_SortOptionsDialog import Ui_SortOptionsDialog
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 class SortOptionsDialog(QDialog, Ui_SortOptionsDialog):
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 Class implementing a dialog to enter the sort options for a line sort.
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 def __init__(self, parent=None):
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 Constructor
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 @param parent reference to the parent widget (QWidget)
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 """
2677
3d4277929fb3 Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2589
diff changeset
25 super(SortOptionsDialog, self).__init__(parent)
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 self.setupUi(self)
3366
6084bb3c3911 Made some changes to have a bunch of dialogs with correct sizes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
27
6084bb3c3911 Made some changes to have a bunch of dialogs with correct sizes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
28 msh = self.minimumSizeHint()
6084bb3c3911 Made some changes to have a bunch of dialogs with correct sizes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
29 self.resize(max(self.width(), msh.width()), msh.height())
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 def getData(self):
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 Public method to get the selected options.
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34
3011
18292228c724 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
35 @return tuple of three flags indicating ascending order, alphanumeric
18292228c724 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
36 sort and case sensitivity (tuple of three boolean)
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 return (
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 self.ascendingButton.isChecked(),
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 self.alnumButton.isChecked(),
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.respectCaseButton.isChecked()
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 )

eric ide

mercurial