本文整理汇总了Python中Settings.Settings.saveSettings方法的典型用法代码示例。如果您正苦于以下问题:Python Settings.saveSettings方法的具体用法?Python Settings.saveSettings怎么用?Python Settings.saveSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings.Settings
的用法示例。
在下文中一共展示了Settings.saveSettings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: rss_dragonfly
# 需要导入模块: from Settings import Settings [as 别名]
# 或者: from Settings.Settings import saveSettings [as 别名]
class rss_dragonfly(Window):
selected = False;
def __init__(self, parent=None):
super(rss_dragonfly, self).__init__(parent);
self.drawWindow();
self.database = DB();
self.feedList = FeedList(self.feedListWidget, self.database);
self.addFeedPopup = AddFeedDialog();
self.editFeedDialog = EditFeedDialog();
self.aboutDialog = AboutDialog();
self.settings = Settings(self.database);
self.settingsDialog = SettingsDialog(self.settings.currentSettings());
self.connect(self.aboutAction, SIGNAL("triggered()"), self.aboutDialog.exec_);
self.connect(self.importAction, SIGNAL("triggered()"), self.fromFile);
self.connect(self.settingsAction, SIGNAL("triggered()"), self.displaySettings);
self.connect(self.settingsDialog.saveButton, SIGNAL("clicked()"), self.saveSettings);
self.connect(self.goButton, SIGNAL("clicked()"), self.readFromAddrBar);
self.connect(self.addressInput, SIGNAL("returnPressed()"), self.readFromAddrBar);
self.connect(self.quitAction, SIGNAL("triggered()"), self.quit)
self.connect(self.addNewFeedButton, SIGNAL("clicked()"), self.addFeedPopup.exec_)
self.feedListWidget.itemActivated.connect(self.listItemSelected);
self.feedListWidget.setContextMenuPolicy(Qt.CustomContextMenu);
self.connect(self.feedListWidget, SIGNAL("customContextMenuRequested(const QPoint &)"), self.listMenu);
self.connect(self.reloadFeedsButton, SIGNAL("clicked()"), self.updateAllFeeds);
# context menu form list
self.connect(self.updateItemAction, SIGNAL("triggered()"), self.updateSelectedFeed);
self.connect(self.deleteItemAction, SIGNAL("triggered()"), self.rmFeed);
self.connect(self.editItemAction, SIGNAL("triggered()"), self.editFeed);
self.connect(self.checkUpdatesAction, SIGNAL("triggered()"), self.checkForUpdates);
self.connect(self.rmFeedButton, SIGNAL("clicked()"), self.rmFeed)
self.connect(self.saveFromAddrButton, SIGNAL("clicked()"), self.saveOpened);
#popUp
#popUp signals:
self.connect(self.addFeedPopup.send, SIGNAL("clicked()"), self.addFeed);
self.connect(self.addFeedPopup.cancel, SIGNAL("clicked()"), self.cancel);
self.connect(self.aboutDialog.closeButton, SIGNAL("clicked()"), self.aboutDialog.close);
self.connect(self.editItemAction, SIGNAL("clicked()"), self.editFeed);
self.connect(self.editFeedDialog.save, SIGNAL("clicked()"), self.editFeedSubmit);
self.rmFeedButton.setDisabled(True);
self.saveFromAddrButton.setDisabled(True);
def start(self, tray):
startDB = DB();
settings = Settings(startDB);
settings = settings.currentSettings();
FeedBox.FeedBox.setTheme(settings['theme']);
if(settings['startMinimalized']):
tray.minimalization();
if(settings['startup']):
self.updateAllFeeds();
def listMenu(self, point):
currentItem = self.feedListWidget.currentItem()
if currentItem:
self.selected = self.feedListWidget.indexFromItem(currentItem).row()
#self.listItemSelected(currentItem)
self.listItemMenu.exec_(QCursor.pos());
def readFromAddrBar(self):
if len(str(self.addressInput.text())) > 1:
if self.selected != False:
self.selected = False;
source = Source();
source = source.fromURL(str(self.addressInput.text()));
if(source != False):
try:
feed = Feed(source);
self.rssContentView.setHtml(unicode(FeedBox.FeedBox.showFeeds(feed.feedTitle, feed.toHTML())));
self.updateTitle(str(feed.feedTitle).replace("'", "'"));
self.rmFeedButton.setEnabled(False);
#self.reloadOneFeedButton.setEnabled(False);
self.saveFromAddrButton.setEnabled(True);
#.........这里部分代码省略.........