本文整理汇总了Python中PySide.QtCore.QCoreApplication.setApplicationName方法的典型用法代码示例。如果您正苦于以下问题:Python QCoreApplication.setApplicationName方法的具体用法?Python QCoreApplication.setApplicationName怎么用?Python QCoreApplication.setApplicationName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtCore.QCoreApplication
的用法示例。
在下文中一共展示了QCoreApplication.setApplicationName方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
def __init__(self):
assert self._instance == None
Config._instance = self
QCoreApplication.setOrganizationName("nicolas.carrier")
QCoreApplication.setApplicationVersion(version)
QCoreApplication.setApplicationName("gem")
self.__settings = QSettings()
示例2: __init__
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
def __init__(self,audio=True,vibra=True):
_d = NotifierDebug();
self._d = _d.d;
self.manager = MNotificationManager('wazappnotify','WazappNotify');
self.vibra = vibra
self.personalRingtone = WAConstants.DEFAULT_SOUND_NOTIFICATION;
self.personalVibrate = True;
self.groupRingtone = WAConstants.DEFAULT_SOUND_NOTIFICATION;
self.groupVibrate = True;
QCoreApplication.setApplicationName("Wazapp");
self.audioOutput = Phonon.AudioOutput(Phonon.MusicCategory, None)
self.mediaObject = Phonon.MediaObject(None)
Phonon.createPath(self.mediaObject, self.audioOutput)
self.profileChanged(0, 0, self.getCurrentProfile(), 0)
bus = dbus.SessionBus()
mybus = bus.get_object('com.nokia.profiled', '/com/nokia/profiled')
self.nface = dbus.Interface(mybus, 'com.nokia.profiled')
self.nface.connect_to_signal("profile_changed", self.profileChanged)
#prof = self.getCurrentProfile()
#reply = self.nface.get_value(prof,"ringing.alert.volume");
#self.currentProfile = prof
#self.currentVolume = "1.0" if reply=="100" else "0." + reply
#self._d("Checking current profile: " + prof + " - Volume: " + self.currentVolume)
#self.audioOutput.setVolume(float(self.currentVolume))
#self.newMessageSound = WAConstants.DEFAULT_SOUND_NOTIFICATION #fetch from settings
self.devInfo = QSystemDeviceInfo();
#self.devInfo.currentProfileChanged.connect(self.profileChanged);
self.audio = True
'''if audio:
self.audio = QMediaPlayer(None,QMediaPlayer.LowLatency);
self.audio.setVolume(100);
else:
self.audio = False'''
self.enabled = True
self.notifications = {}
# vibration comes too early here, now handled by ui.py when the message is already added in QML
# well, the truth is that sound comes too late... :D
#>> Any notification should be handler by the notifier, not UI :P I don't feel it's too early though,
# but if necessary connect to a signal and vibrate from here.
if self.vibra:
self.vibra = QFeedbackHapticsEffect();
self.vibra.setIntensity(1.0);
self.vibra.setDuration(200);
示例3: onLoad
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
def onLoad( self ):
QLocale.setDefault(QLocale(QLocale.C))
locale.setlocale(locale.LC_ALL, 'C')
QCoreApplication.setOrganizationName("CloudTeam")
QCoreApplication.setOrganizationDomain("cloudteam.pro")
QCoreApplication.setApplicationName("juma-moai-editor")
self.qtApp = QApplication( sys.argv )
self.qtSetting = QSettings()
self.setupMainWindow()
self.initialized = True
self.running = False
return True
示例4: __init__
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
def __init__(self, parent=None):
QCoreApplication.setOrganizationName("Hamster Inc.")
QCoreApplication.setApplicationName("Hamster")
QtGui.QMainWindow.__init__(self, parent)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.index_thread = False
self._shutdown_requested = False
self.downloader = DownloadManager()
self.downloader.dl_finished.connect(self.update_cover)
header = ['Movie']
#self.db = MovieDB("movies")
tv = self.ui.tableView
tv.setShowGrid(False)
#model = MyTableModel(self.db, header, tv)
#titles = self.db.get_movie_titles()
self.index = get_user_index()
self.db = get_user_db()
results = self.index.list_all()
self.model = ResultViewModel(results, header, tv)
#model = QtGui.QStandardItemModel()
#model.insertRow(0, [QtGui.QStandardItem("hallo")])
#model.insertRow(0, [QtGui.QStandardItem("sadf")])
#model.insertRow(0, [QtGui.QStandardItem("pfui")])
#model.insertRow(0, [QtGui.QStandardItem("warum?")])
#model.insertRow(0, [QtGui.QStandardItem("haeff")])
tv.setModel(self.model)
selectionModel = tv.selectionModel()
# hide vertical header
vh = tv.verticalHeader()
vh.setVisible(False)
# set horizontal header properties
hh = tv.horizontalHeader()
hh.setStretchLastSection(True)
selectionModel.selectionChanged.connect(self.setCurrentSelection)
self.ui.search_bar.textChanged.connect(self.update_model)
self.ui.action_sync_now.triggered.connect(self.sync)
self.settings = QSettings()
global MOVIE_DIR
MOVIE_DIR = self.settings.value("movie_dir", MOVIE_DIR)
self.settings.setValue("movie_dir", MOVIE_DIR)
示例5: init_settings
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
def init_settings(self):
QCoreApplication.setOrganizationName("erdinc.me")
QCoreApplication.setOrganizationDomain("erdinc.me")
QCoreApplication.setApplicationName("IMAPLinkParser")
self.settings = QSettings()
示例6: show_and_raise
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
val_str = self.convert_val_to_str(setting.value)
setting_field.setText(setting.filter_name(val_str))
if setting.type == 'check':
setting_field.setChecked(setting.value)
if setting.type == 'list':
val_str = self.convert_val_to_str(setting.value)
index = setting_field.findText(val_str)
if index != -1:
setting_field.setCurrentIndex(index)
if setting.type == 'range':
setting_field.setValue(setting.value)
self.ex_button.setEnabled(self.required_settings_filled())
def show_and_raise(self):
self.show()
self.raise_()
if __name__ == '__main__':
app = QApplication(sys.argv)
QCoreApplication.setApplicationName("Web2Executable")
QCoreApplication.setApplicationVersion(__gui_version__)
QCoreApplication.setOrganizationName("SimplyPixelated")
QCoreApplication.setOrganizationDomain("simplypixelated.com")
frame = MainWindow(1000, 500)
frame.show_and_raise()
sys.exit(app.exec_())
示例7: main
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
import argparse
import locale
import sys
from PySide import QtGui
from PySide.QtCore import QSettings, QLocale, QCoreApplication
import inselect
from inselect.lib.utils import debug_print
from inselect.gui.main_window import MainWindow
# Values used by several important parts of Qt's machinery including the GUI
# and QSettings.
QCoreApplication.setOrganizationName('NHM')
QCoreApplication.setApplicationName('Inselect')
QCoreApplication.setApplicationVersion(inselect.__version__)
QCoreApplication.setOrganizationDomain('nhm.ac.uk')
def main(args):
parser = argparse.ArgumentParser(description='Runs the inselect user-interface')
parser.add_argument("file", help='The inselect document to open', nargs='?')
parser.add_argument('-d', '--debug', action='store_true',
help='Show debug messages')
parser.add_argument('-l', '--locale', action='store',
help='Use LOCALE; intended for testing purposes only')
parser.add_argument('-v', '--version', action='version',
version='%(prog)s ' + inselect.__version__)
parsed = parser.parse_args(args[1:])
示例8: QApplication
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
self.nam,
url=self.settings_manager.sync_manager.server_address,
username=self.settings_manager.sync_manager.username,
password=self.settings_manager.sync_manager.password,
certificate=self.settings_manager.sync_manager.certificate)
self.settings_window.finished.connect(self.sync_clicked)
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Generate domain passwords from your masterpassword.")
parser.add_argument('-u', '--update-sync-settings',
action='store_const', const=True,
help="Ask for server settings before synchronization.")
parser.add_argument('--master-password', help="Prefill the masterpassword field.")
parser.add_argument('-d', '--domain', help="Prefill the domain field.")
args = parser.parse_args()
app = QApplication([])
QCoreApplication.setOrganizationName("c't")
QCoreApplication.setOrganizationDomain("ct.de")
QCoreApplication.setApplicationName("ctSESAM-pyside")
window = MainWindow()
if type(args.master_password) is str and args.master_password:
window.set_masterpassword(args.master_password)
window.masterpassword_changed()
window.masterpassword_entered()
if type(args.domain) is str and args.domain:
window.set_domain(args.domain)
window.domain_changed()
if args.update_sync_settings:
window.show_sync_settings()
app.exec_()
示例9: main
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
import argparse
import sys
from PySide.QtGui import QApplication
from PySide.QtCore import QCoreApplication
import syrup
from syrup.main_window import MainWindow
# The QSettings default constructor uses the application's organizationName
# and applicationName properties.
QCoreApplication.setOrganizationName('NHM')
QCoreApplication.setApplicationName('syrup')
# No obvious benefit to also setting these but neither is there any obvious harm
QCoreApplication.setApplicationVersion(syrup.__version__)
QCoreApplication.setOrganizationDomain('nhm.ac.uk')
def main(args):
parser = argparse.ArgumentParser(description=syrup.__doc__)
parser.add_argument('-v', '--version', action='version',
version='%(prog)s ' + syrup.__version__)
parsed = parser.parse_args(args[1:])
app = QApplication(args)
window = MainWindow(app)
window.show_from_geometry_settings()
sys.exit(app.exec_())
示例10: ConsoleStream
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
self.livereload.lua = self.moaiWidget.lua
self.livereload.watchDirectory(self.workingDir)
class ConsoleStream(QtCore.QObject):
message = QtCore.Signal(str)
def __init__(self, parent=None):
super(ConsoleStream, self).__init__(parent)
def write(self, message):
self.message.emit(str(message))
if __name__ == '__main__':
QCoreApplication.setOrganizationName("DigitalClick")
QCoreApplication.setOrganizationDomain("cloudteam.pro")
QCoreApplication.setApplicationName("Moai Editor")
app = QApplication(sys.argv)
script = None
if len(sys.argv) > 1:
script = sys.argv[1]
mainWindow = MainWindow(script = script)
# all output except traceback and user prints is DIM
print(Style.DIM)
mainWindow.show()
app.exec_()
print(Style.RESET_ALL)
示例11: create_db
# 需要导入模块: from PySide.QtCore import QCoreApplication [as 别名]
# 或者: from PySide.QtCore.QCoreApplication import setApplicationName [as 别名]
from PySide.QtGui import QApplication
from PySide.QtCore import QCoreApplication
from time_tracker import constants
from time_tracker.ui import MainForm
from time_tracker.db import create_db
from time_tracker.service import ProjectService, SessionService, PauseService
if __name__ == '__main__':
locale.setlocale(locale.LC_ALL, "english_us") # russian_russia
create_db(constants.DATABASE_FILE)
QCoreApplication.setOrganizationName("Kartavykh Soft")
QCoreApplication.setApplicationName("Time Tracker")
app = QApplication(sys.argv)
pause_service = PauseService()
project_service = ProjectService()
session_service = SessionService()
session_service.timer_updated.connect(project_service.timer_update_slot)
session_service.session_stopped.connect(project_service.session_stop_slot)
session_service.session_paused.connect(pause_service.session_pause_slot)
session_service.session_resumed.connect(pause_service.session_resume_slot)
session_service.session_stopped.connect(pause_service.session_stop_slot)
main_form = MainForm(project_service, session_service)
main_form.show()