aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2014-11-06 01:02:04 +0100
committerVictor Häggqvist <[email protected]>2014-11-06 01:02:04 +0100
commit77c01f9d49f2fc0198b862f92458c6c103820a69 (patch)
treefde5e579f9dd8964887cae2e09243bfe7c6bd381
init
-rw-r--r--.gitignore54
-rw-r--r--AndroidResR.pngbin0 -> 75724 bytes
-rw-r--r--AndroidResR/AndroidResR.py227
-rw-r--r--AndroidResR/__init__.py0
-rw-r--r--AndroidResR/ic_launcher.pngbin0 -> 11079 bytes
-rw-r--r--AndroidResR/util/ConfigLoader.py42
-rw-r--r--AndroidResR/util/__init__.py1
-rw-r--r--AndroidResR/view/AndroidResR.py154
-rw-r--r--AndroidResR/view/AndroidResR.ui271
-rw-r--r--AndroidResR/view/__init__.py1
-rw-r--r--Makefile5
-rw-r--r--README.md14
-rw-r--r--setup.py21
13 files changed, 790 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..db4561e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,54 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.cache
+nosetests.xml
+coverage.xml
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
diff --git a/AndroidResR.png b/AndroidResR.png
new file mode 100644
index 0000000..429028d
--- /dev/null
+++ b/AndroidResR.png
Binary files differ
diff --git a/AndroidResR/AndroidResR.py b/AndroidResR/AndroidResR.py
new file mode 100644
index 0000000..dfa40a3
--- /dev/null
+++ b/AndroidResR/AndroidResR.py
@@ -0,0 +1,227 @@
+# coding=utf-8
+import os
+from os import listdir, remove
+from os.path import join, isfile
+import sys
+from shutil import copyfile
+from PyQt4 import QtGui
+from view.AndroidResR import Ui_MainWindow
+from util.ConfigLoader import ConfigLoader
+
+
+__author__ = 'Victor Häggqvist'
+
+DRAWABLEDIRS = ["drawable-mdpi", "drawable-hdpi", "drawable-xhdpi", "drawable-xxhdpi", "drawable-xxxhdpi"]
+DRAWABLESHORT = ["mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi"]
+
+
+class Window(QtGui.QMainWindow, Ui_MainWindow):
+ def __init__(self):
+ QtGui.QMainWindow.__init__(self)
+ self.setupUi(self)
+ self.setup()
+
+ self.config = ConfigLoader()
+ self.currentIndex = None
+ self.currentIndexDest = None
+
+ self.srcIconset = self.config.get(self.config.SRCPATH)
+ if self.srcIconset:
+ self.srcPath.setText(self.srcIconset)
+ self.populateSrcList()
+
+ self.appResFolder = self.config.get(self.config.DESTPATH)
+ if self.appResFolder:
+ self.destPath.setText(self.appResFolder)
+ self.scanResources()
+
+ def setup(self):
+ """
+ bind signals
+ """
+ self.setWindowTitle("AndroidResR")
+ self.setWindowIcon(QtGui.QIcon("ic_launcher.png"))
+ self.setFixedSize(self.size())
+ self.statusbar.setSizeGripEnabled(False)
+ self.selectSrc.clicked.connect(self.openSrc)
+ self.selectDest.clicked.connect(self.openDest)
+ self.srcListWidget.itemSelectionChanged.connect(self.srcSelectionChange)
+ self.colorWhite.clicked.connect(self.colorClick)
+ self.colorBlack.clicked.connect(self.colorClick)
+ self.webView.setHtml("Select icon to the left to preview")
+ self.resultView.setStyleSheet("background:transparent")
+ self.destListWidget.itemSelectionChanged.connect(self.destSelectionChange)
+
+ self.transferIcons.clicked.connect(self.copyIcons)
+ self.killIcon.clicked.connect(self.deleteIcon)
+
+ self.actionRefresh.triggered.connect(self.refresh)
+ self.actionQuit.triggered.connect(self.quit)
+
+ def quit(self):
+ sys.exit(0)
+
+ def openSrc(self):
+ """
+ open select iconset dialog
+ """
+ startdir = self.srcIconset if self.srcIconset else self.config.userHome
+ openDir = QtGui.QFileDialog.getExistingDirectory(self, "Select Iconset Folder", startdir)
+ if not openDir:
+ return
+
+ self.srcPath.setText(openDir)
+ self.srcIconset = str(openDir)
+
+ self.config.set(self.config.SRCPATH, openDir)
+ self.populateSrcList()
+
+ def openDest(self):
+ openDir = QtGui.QFileDialog.getExistingDirectory(self, "Select App's res folder", self.config.userHome)
+ if not openDir:
+ return
+
+ self.destPath.setText(openDir)
+ self.appResFolder = str(openDir)
+ self.config.set(self.config.DESTPATH, openDir)
+ self.scanResources()
+
+ def populateSrcList(self):
+ self.searchpath = join(self.srcIconset, DRAWABLEDIRS[2])
+
+ self.srcIconFiles = [ f for f in listdir(self.searchpath) if isfile(join(self.searchpath, f)) ]
+ self.srcIconFiles.sort()
+
+ self.srcListWidget.clear()
+ for f in self.srcIconFiles:
+ self.srcListWidget.addItem(f)
+
+ def scanResources(self):
+ self.appResources = []
+ for res in DRAWABLEDIRS:
+ resdir = join(self.appResFolder,res)
+ resShort = res.split("-")[1]
+ try:
+ files = listdir(resdir)
+ except OSError:
+ continue
+ for f in files:
+ if isfile(join(resdir,f)):
+ index = self.getAppResourceIndex(f)
+ if index < 0:
+ self.appResources.append((f,[resShort]))
+ else:
+ self.appResources[index][1].append(resShort)
+
+ self.destListWidget.clear()
+ self.appResources = sorted(self.appResources)
+ for d in self.appResources:
+ self.destListWidget.addItem(d[0])
+
+ def getAppResourceIndex(self, file):
+ i = 0
+ for r in self.appResources:
+ if r[0] == file:
+ return i
+ i += 1
+ return -1
+
+ def srcSelectionChange(self):
+ """
+ On selection change in src list
+ """
+ self.currentIndex = self.srcListWidget.selectedIndexes()[0].row()
+ self.previewIcon()
+
+ def colorClick(self):
+ """
+ On color checkbox clicked
+ """
+ self.previewIcon()
+
+ def previewIcon(self):
+ """
+ Preview currently selected icon
+ :return:
+ """
+ if self.currentIndex is None:
+ return
+
+ icon = join(self.searchpath, self.srcIconFiles[self.currentIndex])
+ color = self.getColor()
+ html = '<body style="background:'+color+'"><img src="file://'+icon+'"></body>'
+ self.webView.setHtml(html)
+
+ def getColor(self):
+ if self.colorWhite.isChecked():
+ return '#fff'
+ elif self.colorBlack.isChecked():
+ return '#000'
+
+ def destSelectionChange(self):
+ self.currentIndexDest = self.destListWidget.selectedIndexes()[0].row() if len(self.destListWidget.selectedIndexes()) else None
+ self.displayResInfo()
+
+ def displayResInfo(self):
+ if self.currentIndexDest is None:
+ return
+
+ item = self.appResources[self.currentIndexDest]
+
+ html = '<body style="font-size:12px; margin:0; padding;">'
+ html += item[0]+"<br>"
+
+ for dip in DRAWABLESHORT:
+ if dip in item[1]:
+ html += dip+': <span style="color:#0f0">yes</span><br>'
+ else:
+ html += dip+': <span style="color:#f00">no</span><br>'
+
+ html += "</body>"
+ self.resultView.setHtml(html)
+
+ def copyIcons(self):
+ item = self.srcIconFiles[self.currentIndex]
+
+ for dip in DRAWABLEDIRS:
+ fullsrc = join(self.srcIconset, dip, item)
+ fulldest = join(self.appResFolder, dip, item)
+ try:
+ copyfile(fullsrc, fulldest)
+ except IOError:
+ os.mkdir(join(self.appResFolder, dip))
+ copyfile(fullsrc, fulldest)
+ # print fullsrc,"->",fulldest
+ self.scanResources()
+
+ def refresh(self):
+ self.scanResources()
+ self.populateSrcList()
+
+ def deleteIcon(self):
+ if self.currentIndexDest is None:
+ return
+
+ icon = self.appResources[self.currentIndexDest]
+ dips = icon[1]
+
+ for dip in dips:
+ path = join(self.appResFolder, "drawable-"+dip, icon[0])
+ # print path
+ remove(path)
+ self.statusBar().showMessage("Removed "+icon[0], 10*1000)
+ self.scanResources()
+
+
+
+
+
+def main():
+ app = QtGui.QApplication(sys.argv)
+ ui = Window()
+ ui.show()
+ sys.exit(app.exec_())
+
+
+if __name__ == '__main__':
+ main()
diff --git a/AndroidResR/__init__.py b/AndroidResR/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/AndroidResR/__init__.py
diff --git a/AndroidResR/ic_launcher.png b/AndroidResR/ic_launcher.png
new file mode 100644
index 0000000..0fe2e80
--- /dev/null
+++ b/AndroidResR/ic_launcher.png
Binary files differ
diff --git a/AndroidResR/util/ConfigLoader.py b/AndroidResR/util/ConfigLoader.py
new file mode 100644
index 0000000..b12771f
--- /dev/null
+++ b/AndroidResR/util/ConfigLoader.py
@@ -0,0 +1,42 @@
+import ConfigParser
+from os.path import expanduser, join, isfile
+
+__author__ = 'victor'
+
+
+class ConfigLoader():
+ SRCPATH = "srcpath"
+ DESTPATH = "destpath"
+
+ def __init__(self):
+ self.userHome = expanduser("~")
+ self.CONFIG_FILE = join(self.userHome, '.androidresr')
+ self.config = ConfigParser.RawConfigParser(allow_no_value=True)
+
+ if not isfile(self.CONFIG_FILE):
+ self.initFile()
+
+ self.load()
+
+ def load(self):
+ if not isfile(self.CONFIG_FILE):
+ raise RuntimeError('No config file (', self.CONFIG_FILE, ') found')
+ self.config.readfp(open(self.CONFIG_FILE))
+
+ def set(self, key, value):
+ self.config.set('general', key, value)
+ self.write()
+
+ def get(self, key):
+ try:
+ return self.config.get("general", key)
+ except ConfigParser.NoOptionError:
+ return None
+
+ def initFile(self):
+ self.config.add_section('general')
+ self.write()
+
+ def write(self):
+ with open(self.CONFIG_FILE, 'w') as configfile:
+ self.config.write(configfile)
diff --git a/AndroidResR/util/__init__.py b/AndroidResR/util/__init__.py
new file mode 100644
index 0000000..1a2b8e3
--- /dev/null
+++ b/AndroidResR/util/__init__.py
@@ -0,0 +1 @@
+__author__ = 'victor'
diff --git a/AndroidResR/view/AndroidResR.py b/AndroidResR/view/AndroidResR.py
new file mode 100644
index 0000000..67bec8c
--- /dev/null
+++ b/AndroidResR/view/AndroidResR.py
@@ -0,0 +1,154 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'AndroidResR/view/AndroidResR.ui'
+#
+# Created: Thu Nov 6 00:12:20 2014
+# by: PyQt4 UI code generator 4.11.2
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+try:
+ _fromUtf8 = QtCore.QString.fromUtf8
+except AttributeError:
+ def _fromUtf8(s):
+ return s
+
+try:
+ _encoding = QtGui.QApplication.UnicodeUTF8
+ def _translate(context, text, disambig):
+ return QtGui.QApplication.translate(context, text, disambig, _encoding)
+except AttributeError:
+ def _translate(context, text, disambig):
+ return QtGui.QApplication.translate(context, text, disambig)
+
+class Ui_MainWindow(object):
+ def setupUi(self, MainWindow):
+ MainWindow.setObjectName(_fromUtf8("MainWindow"))
+ MainWindow.resize(794, 600)
+ self.centralwidget = QtGui.QWidget(MainWindow)
+ self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
+ self.verticalLayoutWidget = QtGui.QWidget(self.centralwidget)
+ self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 281, 541))
+ self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
+ self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
+ self.verticalLayout.setMargin(0)
+ self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
+ self.label = QtGui.QLabel(self.verticalLayoutWidget)
+ self.label.setObjectName(_fromUtf8("label"))
+ self.verticalLayout.addWidget(self.label)
+ self.horizontalLayout = QtGui.QHBoxLayout()
+ self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
+ self.srcPath = QtGui.QLineEdit(self.verticalLayoutWidget)
+ self.srcPath.setObjectName(_fromUtf8("srcPath"))
+ self.horizontalLayout.addWidget(self.srcPath)
+ self.selectSrc = QtGui.QPushButton(self.verticalLayoutWidget)
+ self.selectSrc.setObjectName(_fromUtf8("selectSrc"))
+ self.horizontalLayout.addWidget(self.selectSrc)
+ self.verticalLayout.addLayout(self.horizontalLayout)
+ self.srcListWidget = QtGui.QListWidget(self.verticalLayoutWidget)
+ self.srcListWidget.setObjectName(_fromUtf8("srcListWidget"))
+ self.verticalLayout.addWidget(self.srcListWidget)
+ self.verticalLayoutWidget_2 = QtGui.QWidget(self.centralwidget)
+ self.verticalLayoutWidget_2.setGeometry(QtCore.QRect(500, 10, 281, 541))
+ self.verticalLayoutWidget_2.setObjectName(_fromUtf8("verticalLayoutWidget_2"))
+ self.verticalLayout_2 = QtGui.QVBoxLayout(self.verticalLayoutWidget_2)
+ self.verticalLayout_2.setMargin(0)
+ self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
+ self.label_2 = QtGui.QLabel(self.verticalLayoutWidget_2)
+ self.label_2.setObjectName(_fromUtf8("label_2"))
+ self.verticalLayout_2.addWidget(self.label_2)
+ self.horizontalLayout_2 = QtGui.QHBoxLayout()
+ self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
+ self.destPath = QtGui.QLineEdit(self.verticalLayoutWidget_2)
+ self.destPath.setObjectName(_fromUtf8("destPath"))
+ self.horizontalLayout_2.addWidget(self.destPath)
+ self.selectDest = QtGui.QPushButton(self.verticalLayoutWidget_2)
+ self.selectDest.setObjectName(_fromUtf8("selectDest"))
+ self.horizontalLayout_2.addWidget(self.selectDest)
+ self.verticalLayout_2.addLayout(self.horizontalLayout_2)
+ self.destListWidget = QtGui.QListWidget(self.verticalLayoutWidget_2)
+ self.destListWidget.setObjectName(_fromUtf8("destListWidget"))
+ self.verticalLayout_2.addWidget(self.destListWidget)
+ self.transferIcons = QtGui.QPushButton(self.centralwidget)
+ self.transferIcons.setGeometry(QtCore.QRect(380, 270, 31, 25))
+ self.transferIcons.setObjectName(_fromUtf8("transferIcons"))
+ self.killIcon = QtGui.QPushButton(self.centralwidget)
+ self.killIcon.setGeometry(QtCore.QRect(380, 300, 31, 25))
+ self.killIcon.setObjectName(_fromUtf8("killIcon"))
+ self.webView = QtWebKit.QWebView(self.centralwidget)
+ self.webView.setGeometry(QtCore.QRect(310, 60, 171, 200))
+ self.webView.setAutoFillBackground(False)
+ self.webView.setProperty("url", QtCore.QUrl(_fromUtf8("about:blank")))
+ self.webView.setObjectName(_fromUtf8("webView"))
+ self.colorBlack = QtGui.QRadioButton(self.centralwidget)
+ self.colorBlack.setGeometry(QtCore.QRect(310, 30, 61, 20))
+ self.colorBlack.setObjectName(_fromUtf8("colorBlack"))
+ self.colorWhite = QtGui.QRadioButton(self.centralwidget)
+ self.colorWhite.setGeometry(QtCore.QRect(370, 30, 61, 20))
+ self.colorWhite.setChecked(True)
+ self.colorWhite.setObjectName(_fromUtf8("colorWhite"))
+ self.label_3 = QtGui.QLabel(self.centralwidget)
+ self.label_3.setGeometry(QtCore.QRect(310, 10, 121, 16))
+ self.label_3.setObjectName(_fromUtf8("label_3"))
+ self.resultView = QtWebKit.QWebView(self.centralwidget)
+ self.resultView.setGeometry(QtCore.QRect(310, 340, 171, 200))
+ self.resultView.setAutoFillBackground(False)
+ self.resultView.setProperty("url", QtCore.QUrl(_fromUtf8("about:blank")))
+ self.resultView.setObjectName(_fromUtf8("resultView"))
+ MainWindow.setCentralWidget(self.centralwidget)
+ self.menubar = QtGui.QMenuBar(MainWindow)
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 794, 22))
+ self.menubar.setObjectName(_fromUtf8("menubar"))
+ self.menuFile = QtGui.QMenu(self.menubar)
+ self.menuFile.setObjectName(_fromUtf8("menuFile"))
+ self.menuHelp = QtGui.QMenu(self.menubar)
+ self.menuHelp.setObjectName(_fromUtf8("menuHelp"))
+ self.menuView = QtGui.QMenu(self.menubar)
+ self.menuView.setObjectName(_fromUtf8("menuView"))
+ MainWindow.setMenuBar(self.menubar)
+ self.statusbar = QtGui.QStatusBar(MainWindow)
+ self.statusbar.setObjectName(_fromUtf8("statusbar"))
+ MainWindow.setStatusBar(self.statusbar)
+ self.actionQuit = QtGui.QAction(MainWindow)
+ self.actionQuit.setObjectName(_fromUtf8("actionQuit"))
+ self.actionAbout = QtGui.QAction(MainWindow)
+ self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
+ self.actionRefresh = QtGui.QAction(MainWindow)
+ self.actionRefresh.setObjectName(_fromUtf8("actionRefresh"))
+ self.menuFile.addAction(self.actionQuit)
+ self.menuHelp.addAction(self.actionAbout)
+ self.menuView.addAction(self.actionRefresh)
+ self.menubar.addAction(self.menuFile.menuAction())
+ self.menubar.addAction(self.menuView.menuAction())
+ self.menubar.addAction(self.menuHelp.menuAction())
+
+ self.retranslateUi(MainWindow)
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+ def retranslateUi(self, MainWindow):
+ MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
+ self.label.setText(_translate("MainWindow", "Source Iconset", None))
+ self.srcPath.setPlaceholderText(_translate("MainWindow", "Path to iconset", None))
+ self.selectSrc.setText(_translate("MainWindow", "Browse", None))
+ self.label_2.setText(_translate("MainWindow", "App resources", None))
+ self.destPath.setPlaceholderText(_translate("MainWindow", "Path to app res folder", None))
+ self.selectDest.setText(_translate("MainWindow", "Browse", None))
+ self.transferIcons.setToolTip(_translate("MainWindow", "Copy Icons to App", None))
+ self.transferIcons.setText(_translate("MainWindow", "->", None))
+ self.killIcon.setToolTip(_translate("MainWindow", "Remove Icons from App", None))
+ self.killIcon.setText(_translate("MainWindow", "X-", None))
+ self.colorBlack.setText(_translate("MainWindow", "Black", None))
+ self.colorWhite.setText(_translate("MainWindow", "White", None))
+ self.label_3.setText(_translate("MainWindow", "Background color", None))
+ self.menuFile.setTitle(_translate("MainWindow", "File", None))
+ self.menuHelp.setTitle(_translate("MainWindow", "Help", None))
+ self.menuView.setTitle(_translate("MainWindow", "View", None))
+ self.actionQuit.setText(_translate("MainWindow", "Quit", None))
+ self.actionQuit.setShortcut(_translate("MainWindow", "Alt+F4", None))
+ self.actionAbout.setText(_translate("MainWindow", "About", None))
+ self.actionRefresh.setText(_translate("MainWindow", "Refresh", None))
+ self.actionRefresh.setShortcut(_translate("MainWindow", "F5", None))
+
+from PyQt4 import QtWebKit
diff --git a/AndroidResR/view/AndroidResR.ui b/AndroidResR/view/AndroidResR.ui
new file mode 100644
index 0000000..ceec328
--- /dev/null
+++ b/AndroidResR/view/AndroidResR.ui
@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>794</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralwidget">
+ <widget class="QWidget" name="verticalLayoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>281</width>
+ <height>541</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Source Iconset</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLineEdit" name="srcPath">
+ <property name="placeholderText">
+ <string>Path to iconset</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="selectSrc">
+ <property name="text">
+ <string>Browse</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QListWidget" name="srcListWidget"/>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="verticalLayoutWidget_2">
+ <property name="geometry">
+ <rect>
+ <x>500</x>
+ <y>10</y>
+ <width>281</width>
+ <height>541</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>App resources</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLineEdit" name="destPath">
+ <property name="placeholderText">
+ <string>Path to app res folder</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="selectDest">
+ <property name="text">
+ <string>Browse</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QListWidget" name="destListWidget"/>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QPushButton" name="transferIcons">
+ <property name="geometry">
+ <rect>
+ <x>380</x>
+ <y>270</y>
+ <width>31</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Copy Icons to App</string>
+ </property>
+ <property name="text">
+ <string>-&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="killIcon">
+ <property name="geometry">
+ <rect>
+ <x>380</x>
+ <y>300</y>
+ <width>31</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Remove Icons from App</string>
+ </property>
+ <property name="text">
+ <string>X-</string>
+ </property>
+ </widget>
+ <widget class="QWebView" name="webView" native="true">
+ <property name="geometry">
+ <rect>
+ <x>310</x>
+ <y>60</y>
+ <width>171</width>
+ <height>200</height>
+ </rect>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="url" stdset="0">
+ <url>
+ <string>about:blank</string>
+ </url>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="colorBlack">
+ <property name="geometry">
+ <rect>
+ <x>310</x>
+ <y>30</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Black</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="colorWhite">
+ <property name="geometry">
+ <rect>
+ <x>370</x>
+ <y>30</y>
+ <width>61</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>White</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_3">
+ <property name="geometry">
+ <rect>
+ <x>310</x>
+ <y>10</y>
+ <width>121</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Background color</string>
+ </property>
+ </widget>
+ <widget class="QWebView" name="resultView" native="true">
+ <property name="geometry">
+ <rect>
+ <x>310</x>
+ <y>340</y>
+ <width>171</width>
+ <height>200</height>
+ </rect>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="url" stdset="0">
+ <url>
+ <string>about:blank</string>
+ </url>
+ </property>
+ </widget>
+ </widget>
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>794</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuFile">
+ <property name="title">
+ <string>File</string>
+ </property>
+ <addaction name="actionQuit"/>
+ </widget>
+ <widget class="QMenu" name="menuHelp">
+ <property name="title">
+ <string>Help</string>
+ </property>
+ <addaction name="actionAbout"/>
+ </widget>
+ <widget class="QMenu" name="menuView">
+ <property name="title">
+ <string>View</string>
+ </property>
+ <addaction name="actionRefresh"/>
+ </widget>
+ <addaction name="menuFile"/>
+ <addaction name="menuView"/>
+ <addaction name="menuHelp"/>
+ </widget>
+ <widget class="QStatusBar" name="statusbar"/>
+ <action name="actionQuit">
+ <property name="text">
+ <string>Quit</string>
+ </property>
+ <property name="shortcut">
+ <string>Alt+F4</string>
+ </property>
+ </action>
+ <action name="actionAbout">
+ <property name="text">
+ <string>About</string>
+ </property>
+ </action>
+ <action name="actionRefresh">
+ <property name="text">
+ <string>Refresh</string>
+ </property>
+ <property name="shortcut">
+ <string>F5</string>
+ </property>
+ </action>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>QWebView</class>
+ <extends>QWidget</extends>
+ <header>QtWebKitWidgets/QWebView</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/AndroidResR/view/__init__.py b/AndroidResR/view/__init__.py
new file mode 100644
index 0000000..1a2b8e3
--- /dev/null
+++ b/AndroidResR/view/__init__.py
@@ -0,0 +1 @@
+__author__ = 'victor'
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b726270
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,5 @@
+all: ui
+ui:
+ pyuic4 AndroidResR/view/AndroidResR.ui > AndroidResR/view/AndroidResR.py
+pack:
+ python setup.py sdist
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a4ab156
--- /dev/null
+++ b/README.md
@@ -0,0 +1,14 @@
+#AndroidResR
+
+A resource (icon) manager for Android apps
+
+![](AndroidResR.png)
+
+##Install
+Get PyQt4 and PyPi
+
+ sudo apt-get install python-qt4 python-pip
+
+Get AndroidResR from PyPi
+
+ sudo pip install AndroidResR
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..fa5797c
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+# coding=utf-8
+
+from setuptools import find_packages, setup
+
+setup(
+ name='AndroidResR',
+ version='1.0',
+ description='A resource manager for Android',
+ author='Victor Häggqvist',
+ author_email='[email protected]',
+ url='https://victorhqggqvsit.com',
+ license='GPLv2',
+ packages=find_packages(),
+ entry_points = {
+ 'gui_scripts': [
+ 'AndroidResR = AndroidResR.AndroidResR:main'
+ ]
+ }
+ # install_requires=['PyQt4']
+)