diff --git a/README.md b/README.md index e11b44a8a..fcb5b97fa 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A dark stylesheet for Qt applications. License --------- -This project is licensed under the LGPL v3 +This project is licensed under the MIT license. Installation diff --git a/example/example.py b/example/example.py deleted file mode 100755 index 62228f297..000000000 --- a/example/example.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# QDarkStyle - A dark style sheet for Qt applications -# -# Copyright 2012, 2013 Colin Duquesnoy -# -# This software is released under the LGPLv3 license. -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -""" -A simple example of use. - -Load an ui made in QtDesigner and apply the DarkStyleSheet. - - -Requirements: - - Python 2 or Python 3 - - PySide - -.. note.. :: qdarkstyle does not have to be installed to run - the example - -""" -import os -import sys -from PySide import QtGui -from os.path import abspath, dirname -# make the example runnable without the need to install -sys.path.insert(0, abspath(dirname(abspath(__file__)) + '/..')) -import qdarkstyle -import example_ui - - -def main(): - """ - Application entry point - """ - # create the application and the main window - app = QtGui.QApplication(sys.argv) - window = QtGui.QMainWindow() - - # setup ui - ui = example_ui.Ui_MainWindow() - ui.setupUi(window) - window.setWindowTitle("QDarkStyle example") - - # setup stylesheet - app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=True)) - - # run - window.show() - app.exec_() - - -if __name__ == "__main__": - main() - diff --git a/example/example_pyqt.py b/example/example_pyqt.py new file mode 100755 index 000000000..b499a9f00 --- /dev/null +++ b/example/example_pyqt.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python +# +# The MIT License (MIT) +# +# Copyright (c) <2013> +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +""" +A simple example of use. + +Load an ui made in QtDesigner and apply the DarkStyleSheet. + + +Requirements: + - Python 2 or Python 3 + - PySide + +.. note.. :: qdarkstyle does not have to be installed to run + the example + +""" +import os +import sys +from PySide import QtGui +from os.path import abspath, dirname +# make the example runnable without the need to install +sys.path.insert(0, abspath(dirname(abspath(__file__)) + '/..')) +import qdarkstyle +import example_ui + + +def main(): + """ + Application entry point + """ + # create the application and the main window + app = QtGui.QApplication(sys.argv) + window = QtGui.QMainWindow() + + # setup ui + ui = example_ui.Ui_MainWindow() + ui.setupUi(window) + window.setWindowTitle("QDarkStyle example") + + # setup stylesheet + app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=True)) + + # run + window.show() + app.exec_() + + +if __name__ == "__main__": + main() + diff --git a/example/example_pyside.py b/example/example_pyside.py new file mode 100755 index 000000000..b499a9f00 --- /dev/null +++ b/example/example_pyside.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python +# +# The MIT License (MIT) +# +# Copyright (c) <2013> +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# +""" +A simple example of use. + +Load an ui made in QtDesigner and apply the DarkStyleSheet. + + +Requirements: + - Python 2 or Python 3 + - PySide + +.. note.. :: qdarkstyle does not have to be installed to run + the example + +""" +import os +import sys +from PySide import QtGui +from os.path import abspath, dirname +# make the example runnable without the need to install +sys.path.insert(0, abspath(dirname(abspath(__file__)) + '/..')) +import qdarkstyle +import example_ui + + +def main(): + """ + Application entry point + """ + # create the application and the main window + app = QtGui.QApplication(sys.argv) + window = QtGui.QMainWindow() + + # setup ui + ui = example_ui.Ui_MainWindow() + ui.setupUi(window) + window.setWindowTitle("QDarkStyle example") + + # setup stylesheet + app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=True)) + + # run + window.show() + app.exec_() + + +if __name__ == "__main__": + main() + diff --git a/example/example_ui.py b/example/example_pyside_ui.py similarity index 100% rename from example/example_ui.py rename to example/example_pyside_ui.py diff --git a/qdarkstyle/__init__.py b/qdarkstyle/__init__.py index 7cbb24172..f175d6dcd 100644 --- a/qdarkstyle/__init__.py +++ b/qdarkstyle/__init__.py @@ -1,3 +1,27 @@ +# -*- coding: utf-8 -*- +# +# The MIT License (MIT) +# +# Copyright (c) <2013> +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# """ Initialise the QDarkStyleSheet module when used with python. diff --git a/qdarkstyle/compile_qrc.py b/qdarkstyle/compile_qrc.py index 740043615..4ab3738b9 100755 --- a/qdarkstyle/compile_qrc.py +++ b/qdarkstyle/compile_qrc.py @@ -1,13 +1,27 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# QDarkStyle - A dark style sheet for Qt applications +# The MIT License (MIT) # -# Copyright 2012, 2013 Colin Duquesnoy +# Copyright (c) <2013> # -# This software is released under the LGPLv3 license. -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. # """ Utility scripts to compile the qrc file. The script will diff --git a/qdarkstyle/style.qss b/qdarkstyle/style.qss index c2b269d3e..567afbe24 100644 --- a/qdarkstyle/style.qss +++ b/qdarkstyle/style.qss @@ -1,11 +1,25 @@ /* - * QDarkStyle - A dark style sheet for Qt applications + * The MIT License (MIT) * - * Copyright 2012, 2013 Colin Duquesnoy + * Copyright (c) <2013> * - * This software is released under the LGPLv3 license. - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. */ QProgressBar:horizontal { diff --git a/setup.py b/setup.py index 45e282cbf..d0ec68388 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,27 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# QDarkStyle - A dark style sheet for Qt applications +# The MIT License (MIT) # -# Copyright 2012, 2013 Colin Duquesnoy +# Copyright (c) <2013> # -# This software is released under the LGPLv3 license. -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. # """ QDarkStyle is a darks stylesheet for python qt applications @@ -20,7 +34,7 @@ setup( packages=find_packages(), package_data={'qdarkstyle': ["*.qss", "*.qrc", "rc/*.png"]}, url='https://github.com/ColinDuquesnoy/QDarkStyleSheet', - license='LGPLv3', + license='MIT', author='Colin Duquesnoy', author_email='colin.duquesnoy@gmail.com', description='A dark stylesheet for pyside/pyqt applications',