mirror of
				https://github.com/arcan1s/awesome-widgets.git
				synced 2025-11-03 22:33:42 +00:00 
			
		
		
		
	Release pytextmonitor 1.5.2
+ added time formats * fixed definition of conf file for dataengine
This commit is contained in:
		@ -275,9 +275,18 @@ class DataEngine:
 | 
			
		||||
                text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
 | 
			
		||||
                self.parent.label_player.setText(text)
 | 
			
		||||
            elif (sourceName == "Local"):
 | 
			
		||||
                value = str(data[QString(u'DateTime')].toString().toUtf8())
 | 
			
		||||
                if (self.parent.timeFormat.split('$time')[0] != self.parent.timeFormat):
 | 
			
		||||
                    value = str(data[QString(u'DateTime')].toString(Qt.TextDate).toUtf8())
 | 
			
		||||
                    line = self.parent.timeFormat.split('$time')[0] + value.decode("utf-8") + self.parent.timeFormat.split('$time')[1]
 | 
			
		||||
                elif (self.parent.timeFormat.split('$isotime')[0] != self.parent.timeFormat):
 | 
			
		||||
                    value = str(data[QString(u'DateTime')].toString(Qt.ISODate).toUtf8())
 | 
			
		||||
                    line = self.parent.timeFormat.split('$isotime')[0] + value.decode("utf-8") + self.parent.timeFormat.split('$isotime')[1]
 | 
			
		||||
                elif (self.parent.timeFormat.split('$shorttime')[0] != self.parent.timeFormat):
 | 
			
		||||
                    value = str(data[QString(u'DateTime')].toString(Qt.SystemLocaleShortDate).toUtf8())
 | 
			
		||||
                    line = self.parent.timeFormat.split('$shorttime')[0] + value.decode("utf-8") + self.parent.timeFormat.split('$shorttime')[1]
 | 
			
		||||
                elif (self.parent.timeFormat.split('$longtime')[0] != self.parent.timeFormat):
 | 
			
		||||
                    value = str(data[QString(u'DateTime')].toString(Qt.SystemLocaleLongDate).toUtf8())
 | 
			
		||||
                    line = self.parent.timeFormat.split('$longtime')[0] + value.decode("utf-8") + self.parent.timeFormat.split('$longtime')[1]
 | 
			
		||||
                else:
 | 
			
		||||
                    line = self.parent.timeFormat
 | 
			
		||||
                text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
 | 
			
		||||
 | 
			
		||||
@ -63,7 +63,10 @@
 | 
			
		||||
         <item>
 | 
			
		||||
          <widget class="QLineEdit" name="lineEdit_time">
 | 
			
		||||
           <property name="toolTip">
 | 
			
		||||
            <string notr="true">$time - time</string>
 | 
			
		||||
            <string notr="true">$time - time in default format
 | 
			
		||||
$isotime - time in ISO format
 | 
			
		||||
$shorttime - time in short format
 | 
			
		||||
$longtime - time in log format</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user