mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-09 21:24:36 +00:00
qt: move qt.base units into qt root package
This commit is contained in:
parent
773f6651e6
commit
d4919054f9
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,25 +1,21 @@
|
||||
.DS_Store
|
||||
*.pyc
|
||||
__pycache__
|
||||
*.so
|
||||
*.mo
|
||||
*.pyd
|
||||
*.waf*
|
||||
.lock-waf*
|
||||
.idea
|
||||
.tox
|
||||
|
||||
build
|
||||
dist
|
||||
install
|
||||
installer_tmp-cache
|
||||
env
|
||||
/deps
|
||||
cocoa/autogen
|
||||
|
||||
/run.py
|
||||
/conf.json
|
||||
/cocoa/*/Info.plist
|
||||
/cocoa/*/build
|
||||
/qt/base/*_rc.py
|
||||
/qt/*_rc.py
|
||||
/help/*/conf.py
|
||||
/help/*/changelog.rst
|
||||
|
4
build.py
4
build.py
@ -171,8 +171,8 @@ def build_qt(dev):
|
||||
print("Building localizations")
|
||||
build_localizations('qt')
|
||||
print("Building Qt stuff")
|
||||
print_and_do("pyrcc5 {0} > {1}".format(op.join('qt', 'base', 'dg.qrc'), op.join('qt', 'base', 'dg_rc.py')))
|
||||
fix_qt_resource_file(op.join('qt', 'base', 'dg_rc.py'))
|
||||
print_and_do("pyrcc5 {0} > {1}".format(op.join('qt', 'dg.qrc'), op.join('qt', 'dg_rc.py')))
|
||||
fix_qt_resource_file(op.join('qt', 'dg_rc.py'))
|
||||
build_help()
|
||||
print("Creating the run.py file")
|
||||
shutil.copy(op.join('qt', 'run_template.py'), 'run.py')
|
||||
|
@ -1 +1,3 @@
|
||||
__version__ = '3.9.1'
|
||||
__appname__ = 'dupeGuru'
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
__version__ = '6.8.1'
|
||||
__appname__ = 'dupeGuru Music Edition'
|
||||
|
@ -1,2 +0,0 @@
|
||||
__version__ = '2.10.1'
|
||||
__appname__ = 'dupeGuru Picture Edition'
|
@ -1,3 +0,0 @@
|
||||
__version__ = '3.9.1'
|
||||
__appname__ = 'dupeGuru'
|
||||
|
@ -28,13 +28,13 @@ from .directories_dialog import DirectoriesDialog
|
||||
from .problem_dialog import ProblemDialog
|
||||
from .ignore_list_dialog import IgnoreListDialog
|
||||
from .deletion_options import DeletionOptions
|
||||
from ..se.details_dialog import DetailsDialog as DetailsDialogStandard
|
||||
from ..me.details_dialog import DetailsDialog as DetailsDialogMusic
|
||||
from ..pe.details_dialog import DetailsDialog as DetailsDialogPicture
|
||||
from ..se.preferences_dialog import PreferencesDialog as PreferencesDialogStandard
|
||||
from ..me.preferences_dialog import PreferencesDialog as PreferencesDialogMusic
|
||||
from ..pe.preferences_dialog import PreferencesDialog as PreferencesDialogPicture
|
||||
from ..pe.photo import File as PlatSpecificPhoto
|
||||
from .se.details_dialog import DetailsDialog as DetailsDialogStandard
|
||||
from .me.details_dialog import DetailsDialog as DetailsDialogMusic
|
||||
from .pe.details_dialog import DetailsDialog as DetailsDialogPicture
|
||||
from .se.preferences_dialog import PreferencesDialog as PreferencesDialogStandard
|
||||
from .me.preferences_dialog import PreferencesDialog as PreferencesDialogMusic
|
||||
from .pe.preferences_dialog import PreferencesDialog as PreferencesDialogPicture
|
||||
from .pe.photo import File as PlatSpecificPhoto
|
||||
|
||||
tr = trget('ui')
|
||||
|
@ -1,13 +0,0 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file alias="logo_pe">../../images/dgpe_logo_32.png</file>
|
||||
<file alias="logo_pe_big">../../images/dgpe_logo_128.png</file>
|
||||
<file alias="logo_me">../../images/dgme_logo_32.png</file>
|
||||
<file alias="logo_me_big">../../images/dgme_logo_128.png</file>
|
||||
<file alias="logo_se">../../images/dgse_logo_32.png</file>
|
||||
<file alias="logo_se_big">../../images/dgse_logo_128.png</file>
|
||||
<file alias="plus">../../images/plus_8.png</file>
|
||||
<file alias="minus">../../images/minus_8.png</file>
|
||||
<file alias="search_clear_13">../../qtlib/images/search_clear_13.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
9
qt/dg.qrc
Normal file
9
qt/dg.qrc
Normal file
@ -0,0 +1,9 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file alias="logo_se">../images/dgse_logo_32.png</file>
|
||||
<file alias="logo_se_big">../images/dgse_logo_128.png</file>
|
||||
<file alias="plus">../images/plus_8.png</file>
|
||||
<file alias="minus">../images/minus_8.png</file>
|
||||
<file alias="search_clear_13">../qtlib/images/search_clear_13.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -1,17 +1,15 @@
|
||||
# Created By: Virgil Dupras
|
||||
# Created On: 2009-04-27
|
||||
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# Copyright 2016 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
from PyQt5.QtCore import QSize
|
||||
from PyQt5.QtWidgets import QVBoxLayout, QAbstractItemView
|
||||
|
||||
from hscommon.trans import trget
|
||||
from ..base.details_dialog import DetailsDialog as DetailsDialogBase
|
||||
from ..base.details_table import DetailsTable
|
||||
from ..details_dialog import DetailsDialog as DetailsDialogBase
|
||||
from ..details_table import DetailsTable
|
||||
|
||||
tr = trget('ui')
|
||||
|
||||
@ -28,4 +26,4 @@ class DetailsDialog(DetailsDialogBase):
|
||||
self.tableView.setSelectionBehavior(QAbstractItemView.SelectRows)
|
||||
self.tableView.setShowGrid(False)
|
||||
self.verticalLayout.addWidget(self.tableView)
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ from hscommon.trans import trget
|
||||
from core.app import AppMode
|
||||
from core.scanner import ScanType
|
||||
|
||||
from ..base.preferences_dialog import PreferencesDialogBase
|
||||
from ..preferences_dialog import PreferencesDialogBase
|
||||
|
||||
tr = trget('ui')
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
# Created On: 2011-11-27
|
||||
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||
# Copyright 2016 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
from qtlib.column import Column
|
||||
from ..base.results_model import ResultsModel as ResultsModelBase
|
||||
from ..results_model import ResultsModel as ResultsModelBase
|
||||
|
||||
class ResultsModel(ResultsModelBase):
|
||||
COLUMNS = [
|
||||
|
@ -1,9 +1,7 @@
|
||||
# Created By: Virgil Dupras
|
||||
# Created On: 2009-04-27
|
||||
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# Copyright 2016 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
from PyQt5.QtCore import Qt, QSize
|
||||
@ -11,8 +9,8 @@ from PyQt5.QtGui import QPixmap
|
||||
from PyQt5.QtWidgets import QVBoxLayout, QAbstractItemView, QHBoxLayout, QLabel, QSizePolicy
|
||||
|
||||
from hscommon.trans import trget
|
||||
from ..base.details_dialog import DetailsDialog as DetailsDialogBase
|
||||
from ..base.details_table import DetailsTable
|
||||
from ..details_dialog import DetailsDialog as DetailsDialogBase
|
||||
from ..details_table import DetailsTable
|
||||
|
||||
tr = trget('ui')
|
||||
|
||||
@ -21,7 +19,7 @@ class DetailsDialog(DetailsDialogBase):
|
||||
DetailsDialogBase.__init__(self, parent, app)
|
||||
self.selectedPixmap = None
|
||||
self.referencePixmap = None
|
||||
|
||||
|
||||
def _setupUi(self):
|
||||
self.setWindowTitle(tr("Details"))
|
||||
self.resize(502, 295)
|
||||
@ -61,21 +59,21 @@ class DetailsDialog(DetailsDialogBase):
|
||||
self.tableView.setSelectionBehavior(QAbstractItemView.SelectRows)
|
||||
self.tableView.setShowGrid(False)
|
||||
self.verticalLayout.addWidget(self.tableView)
|
||||
|
||||
|
||||
def _update(self):
|
||||
if not self.app.model.selected_dupes:
|
||||
return
|
||||
dupe = self.app.model.selected_dupes[0]
|
||||
group = self.app.model.results.get_group_of_duplicate(dupe)
|
||||
ref = group.ref
|
||||
|
||||
|
||||
self.selectedPixmap = QPixmap(str(dupe.path))
|
||||
if ref is dupe:
|
||||
self.referencePixmap = None
|
||||
else:
|
||||
self.referencePixmap = QPixmap(str(ref.path))
|
||||
self._updateImages()
|
||||
|
||||
|
||||
def _updateImages(self):
|
||||
if self.selectedPixmap is not None:
|
||||
target_size = self.selectedImage.size()
|
||||
@ -89,18 +87,18 @@ class DetailsDialog(DetailsDialogBase):
|
||||
self.referenceImage.setPixmap(scaledPixmap)
|
||||
else:
|
||||
self.referenceImage.setPixmap(QPixmap())
|
||||
|
||||
|
||||
#--- Override
|
||||
def resizeEvent(self, event):
|
||||
self._updateImages()
|
||||
|
||||
|
||||
def show(self):
|
||||
DetailsDialogBase.show(self)
|
||||
self._update()
|
||||
|
||||
|
||||
# model --> view
|
||||
def refresh(self):
|
||||
DetailsDialogBase.refresh(self)
|
||||
if self.isVisible():
|
||||
self._update()
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ from hscommon.trans import trget
|
||||
from core.scanner import ScanType
|
||||
from core.app import AppMode
|
||||
|
||||
from ..base.preferences_dialog import PreferencesDialogBase
|
||||
from ..preferences_dialog import PreferencesDialogBase
|
||||
|
||||
tr = trget('ui')
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
# Created On: 2011-11-27
|
||||
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||
# Copyright 2016 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
from qtlib.column import Column
|
||||
from ..base.results_model import ResultsModel as ResultsModelBase
|
||||
from ..results_model import ResultsModel as ResultsModelBase
|
||||
|
||||
class ResultsModel(ResultsModelBase):
|
||||
COLUMNS = [
|
||||
|
@ -17,12 +17,12 @@ from qtlib.util import moveToScreenCenter, horizontalWrap, createActions
|
||||
from qtlib.search_edit import SearchEdit
|
||||
|
||||
from core.app import AppMode
|
||||
from ..se.results_model import ResultsModel as ResultsModelStandard
|
||||
from ..me.results_model import ResultsModel as ResultsModelMusic
|
||||
from ..pe.results_model import ResultsModel as ResultsModelPicture
|
||||
from .results_model import ResultsView
|
||||
from .stats_label import StatsLabel
|
||||
from .prioritize_dialog import PrioritizeDialog
|
||||
from .se.results_model import ResultsModel as ResultsModelStandard
|
||||
from .me.results_model import ResultsModel as ResultsModelMusic
|
||||
from .pe.results_model import ResultsModel as ResultsModelPicture
|
||||
|
||||
tr = trget('ui')
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||
# Copyright 2016 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
@ -16,9 +16,9 @@ from PyQt5.QtWidgets import QApplication
|
||||
from hscommon.trans import install_gettext_trans_under_qt
|
||||
from qtlib.error_report_dialog import install_excepthook
|
||||
from qtlib.util import setupQtLogging
|
||||
from qt.base import dg_rc
|
||||
from qt.base.platform import BASE_PATH
|
||||
from core_se import __version__, __appname__
|
||||
from qt import dg_rc
|
||||
from qt.platform import BASE_PATH
|
||||
from core import __version__, __appname__
|
||||
|
||||
def main():
|
||||
app = QApplication(sys.argv)
|
||||
@ -32,7 +32,7 @@ def main():
|
||||
install_gettext_trans_under_qt(locale_folder, lang)
|
||||
# Many strings are translated at import time, so this is why we only import after the translator
|
||||
# has been installed
|
||||
from qt.base.app import DupeGuru
|
||||
from qt.app import DupeGuru
|
||||
app.setWindowIcon(QIcon(QPixmap(":/{0}".format(DupeGuru.LOGO_NAME))))
|
||||
dgapp = DupeGuru()
|
||||
install_excepthook('https://github.com/hsoft/dupeguru/issues')
|
||||
|
@ -1,17 +1,15 @@
|
||||
# Created By: Virgil Dupras
|
||||
# Created On: 2009-05-24
|
||||
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# Copyright 2016 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
from PyQt5.QtCore import QSize
|
||||
from PyQt5.QtWidgets import QVBoxLayout, QAbstractItemView
|
||||
|
||||
from hscommon.trans import trget
|
||||
from ..base.details_dialog import DetailsDialog as DetailsDialogBase
|
||||
from ..base.details_table import DetailsTable
|
||||
from ..details_dialog import DetailsDialog as DetailsDialogBase
|
||||
from ..details_table import DetailsTable
|
||||
|
||||
tr = trget('ui')
|
||||
|
||||
@ -28,4 +26,4 @@ class DetailsDialog(DetailsDialogBase):
|
||||
self.tableView.setSelectionBehavior(QAbstractItemView.SelectRows)
|
||||
self.tableView.setShowGrid(False)
|
||||
self.verticalLayout.addWidget(self.tableView)
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ from hscommon.util import tryint
|
||||
from core.app import AppMode
|
||||
from core.scanner import ScanType
|
||||
|
||||
from ..base.preferences_dialog import PreferencesDialogBase
|
||||
from ..preferences_dialog import PreferencesDialogBase
|
||||
|
||||
tr = trget('ui')
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
# Created On: 2011-11-27
|
||||
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||
# Copyright 2016 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
from qtlib.column import Column
|
||||
from ..base.results_model import ResultsModel as ResultsModelBase
|
||||
from ..results_model import ResultsModel as ResultsModelBase
|
||||
|
||||
class ResultsModel(ResultsModelBase):
|
||||
COLUMNS = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user