Пример #1
0
    def __init__(self):
        QWidget.__init__(self)
        self.resize(350, 225)
        self.setMinimumSize(QSize(350, 225))
        self.setMaximumSize(QSize(400, 250))
        self.setWindowTitle(QApplication.applicationName() + " " +
                            QApplication.applicationVersion())

        icon = QIcon()
        icon.addPixmap(QPixmap(":/resim/parcala.png"))
        self.setWindowIcon(icon)

        self.gridLayout = QGridLayout(self)

        self.parcalaButton = QPushButton(self)
        self.parcalaButton.setMinimumSize(QSize(150, 50))
        self.parcalaButton.setText(self.trUtf8("Parçala"))
        self.parcalaButton.clicked.connect(self.parcala)
        self.gridLayout.addWidget(self.parcalaButton, 3, 0, 1, 1)

        self.birlestirButton = QPushButton(self)
        self.birlestirButton.setMinimumSize(QSize(150, 50))
        self.birlestirButton.setText(self.trUtf8("Birleştir"))
        self.birlestirButton.clicked.connect(self.birlestir)
        self.gridLayout.addWidget(self.birlestirButton, 3, 2, 1, 1)

        self.dogrulaButton = QPushButton(self)
        self.dogrulaButton.setMinimumSize(QSize(150, 50))
        self.dogrulaButton.setText(self.trUtf8("Doğrula"))
        self.dogrulaButton.clicked.connect(self.dogrula)
        self.gridLayout.addWidget(self.dogrulaButton, 7, 0, 1, 1)

        self.hakkindaButton = QPushButton(self)
        self.hakkindaButton.setMinimumSize(QSize(150, 50))
        self.hakkindaButton.setText(self.trUtf8("Hakkında"))
        self.hakkindaButton.clicked.connect(self.hakkinda)
        self.gridLayout.addWidget(self.hakkindaButton, 7, 2, 1, 1)

        self.bilgiLabel = QLabel(self)
        self.bilgiLabel.setText(
            self.trUtf8(u"%s %s \u00a9 2011 - www.metehan.us" %
                        (QApplication.applicationName(),
                         QApplication.applicationVersion())))
        self.bilgiLabel.setAlignment(Qt.AlignCenter)
        self.gridLayout.addWidget(self.bilgiLabel, 9, 0, 1, 3)

        spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                 QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 3, 1, 1, 1)
        spacerItem1 = QSpacerItem(0, 20, QSizePolicy.Minimum,
                                  QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem1, 4, 1, 1, 1)
        spacerItem2 = QSpacerItem(20, 40, QSizePolicy.Minimum,
                                  QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem2, 2, 1, 1, 1)
        spacerItem3 = QSpacerItem(20, 40, QSizePolicy.Minimum,
                                  QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem3, 8, 1, 1, 1)
Пример #2
0
Файл: gui.py Проект: halbbob/dff
class gui():
    def __init__(self, debug = False):
        """Launch GUI"""
        self.debug = debug
        self.app = QApplication(sys.argv)

        self.translator = Translator()
        
        self.app.installTranslator(self.translator.getGeneric())
        self.app.installTranslator(self.translator.getDFF())
        self.app.setApplicationName("Digital Forensics Framework")
	self.app.setApplicationVersion("1.2.0")
        pixmap = QPixmap(":splash.png")
        self.splash = SplashScreen(pixmap, Qt.WindowStaysOnTopHint, self.app.applicationVersion())
        self.splash.setMask(pixmap.mask()) 

    def launch(self, modPath = None):
        self.splash.show()
        if modPath:
          self.loader = loader()
          self.loader.do_load(modPath, self.splash.showMessage)
        mainWindow = MainWindow(self.app, self.debug)
        mainWindow.show()

        self.splash.finish(mainWindow)
        sys.exit(self.app.exec_())
def startmain():
    """
    Initialise the application and display the main window.
    """
    app = QApplication(sys.argv)
    app.cleanup_files = []

    QApplication.setStyle(QStyleFactory.create('CleanLooks'))
    QApplication.setPalette(QApplication.style().standardPalette())

    QApplication.setApplicationName('Bing Wallpaper Changer')
    QApplication.setApplicationVersion(VERSION)
    QApplication.setOrganizationName('overThere.co.uk')
    QApplication.setWindowIcon(QIcon(':/icons/ui/ot_icon.svg'))

    print 'AppName: %s' % QApplication.applicationName()
    print 'AppVersion: %s' % QApplication.applicationVersion()
    print 'Company Name: %s' % QApplication.organizationName()

    QLocale.setDefault(QLocale(QLocale.English, QLocale.UnitedKingdom))

    # Add passed arguments to app.
    app.args = parse_arguments()
    print 'Args:', app.args

    # Check to see if application already running.
    existing_pid = instance_check(app)
    if existing_pid:
        print existing_pid
        if app.args.quit_existing:
            # Command line argument passed to close existing program. Do that, then quit.
            if platform.system() == "Windows":
                subprocess.Popen("taskkill /F /T /PID %i" % existing_pid, shell=True)
            else:
                os.killpg(existing_pid, signal.SIGKILL)
        else:
            message_box_error('Program already running.',
                              'You can only have one copy of the Bing Wallpaper Changer running at once.')
        sys.exit()

    mainwindow = MainWindow()
    # mainwindow.show()
    sys.exit(app.exec_())
Пример #4
0
def start_main():
    app = QApplication(sys.argv)

    icon = QIcon(':/icons/application.png')
    app.setWindowIcon(icon)

    # If compiled as a one-file PyInstaller package look for Qt4 Plugins in the TEMP folder.
    try:
        extra_path = [os.path.join(sys._MEIPASS, 'qt4_plugins')]
        app.setLibraryPaths(app.libraryPaths() + extra_path)
        app.utils_path = os.path.join(sys._MEIPASS, 'utils')
    except AttributeError:
        app.utils_path = os.path.join(os.getcwd(), 'utils')

    # Error handling stuff.
    if hasattr(sys, 'frozen'):
        sys.excepthook = except_hook

    app.setApplicationName('ABBYY Automator')
    app.setApplicationVersion(VERSION)
    app.setOrganizationName('Pearl Scan Solutions')

    print 'AppName: %s' % app.applicationName()
    print 'AppVersion: %s' % app.applicationVersion()
    print 'Company Name: %s' % app.organizationName()

    app.setStyle(QStyleFactory.create('Cleanlooks'))
    app.setPalette(QApplication.style().standardPalette())

    if not instance_check(app):
        message_box_error('Program already running.',
                          'You can only have one copy of ABBYY Automator running at once.')
        sys.exit()

    mainwindow = MainWindow()
    mainwindow.show()
    app.exec_()
    app.closeAllWindows()
    app.quit()
Пример #5
0
	def onAboutAppAction(self):
		QMessageBox.about(self, self.tr("&about"), self.tr("%1 version %2").arg(QApplication.applicationName()).arg(QApplication.applicationVersion()))
Пример #6
0
	def __init__(self):
		QMainWindow.__init__(self)
		
		self.sync_delay = 5
		self.sync_active = False
		self.verbose = False

		self.timePattern = re.compile('\.[0-9]+$')
		
		self.setWindowTitle('%s %s' % (QApplication.applicationName(), QApplication.applicationVersion()));
		
		self.widget = QWidget()
		self.setCentralWidget(self.widget)

		self.statusBar = QStatusBar(self)
		self.setStatusBar(self.statusBar)

		self.mAction = self.menuBar().addMenu(self.tr("&Action"))
		#self.mAction.addAction(self.tr("&update"), self.updateTplTable(), QKeySequence('F5'))
		self.mAction.addAction(self.tr('&import records'), self.onImport, QKeySequence('F6'))
		self.mAction.addAction(self.tr('edit &settings'), self.onSettings, QKeySequence('F8'))
		self.mAction.addAction(self.tr("e&xit"), self.onExit, 'Ctrl+Q')

		self.mAbout = self.menuBar().addMenu(self.tr("&about"))
		self.mAbout.addAction(QApplication.applicationName(), self.onAboutAppAction)
		self.mAbout.addAction("Qt", self.onAboutQtAction)
		
		self.pageForwardButton = QPushButton(self)
		self.pageForwardButton.setText('>')
		self.connect(self.pageForwardButton, SIGNAL('clicked()'), self.pageForward)

		self.pageBackwardButton = QPushButton(self)
		self.pageBackwardButton.setText('<')
		self.connect(self.pageBackwardButton, SIGNAL('clicked()'), self.pageBackward)
		
		self.timer = QTimer(self)
		self.timer.setInterval(1000)
		self.connect(self.timer, SIGNAL('timeout()'), self, SLOT('onTimer()'))
		self.time_begin = datetime.now()
		self.time_end = datetime.now()

		self.db_path = os.path.join(os.path.dirname(sys.argv[0]) if os.name != 'posix' else os.path.expanduser('~'), '.tt2.db')
		self.db = sqlite3.connect(self.db_path)
		self.cursor = self.db.cursor()
		
		try:
			self.cursor.execute('SELECT id FROM tt LIMIT 1')
		except:
			self.createDb()
		
		self.settings = self.fetchSettings()
		self.syncer = Syncer(self.db_path, self)
		self.connect( self.syncer, SIGNAL('active'), self.setSyncerActive )
		self.connect( self.syncer, SIGNAL('message'), self.msg )
		self.connect( self.syncer, SIGNAL('newSettings'), self.fetchSettings )
		
		self.layout = QGridLayout(self.widget)
		
		self.descriptionLabel = QLabel(self.widget)
		self.descriptionLabel.setText('Beschreibung')
		self.descriptionLabel.setMaximumHeight( self.font().pointSize() * 2 )
		self.descriptionInput = QLineEdit(self.widget)
		self.updateDescriptionEditCompleter()				
		self.noteLabel = QLabel(self.widget)
		self.noteLabel.setText('Notiz')
		self.noteLabel.setMaximumHeight( self.font().pointSize() * 2 )
		self.noteInput = QLineEdit(self.widget)
		self.startStopButton = QPushButton(self.widget)
		self.startStopButton.setText('Start')
		
		self.tableView = TplTable(self, int( self.getSetting('displayrows', DEFAULTROWS) ) )

		self.pageForwardAction = QAction(self)
		self.pageForwardAction.setShortcut(QKeySequence('Right'))
		self.connect(self.pageForwardAction, SIGNAL('triggered()'), self.pageForward);
		self.pageForwardButton.addAction(self.pageForwardAction)

		self.pageBackwardAction = QAction(self)
		self.pageBackwardAction.setShortcut(QKeySequence('Left'))
		self.connect(self.pageBackwardAction, SIGNAL('triggered()'), self.pageBackward);
		self.pageBackwardButton.addAction(self.pageBackwardAction)

		self.updateTplTable()
			
		self.layout.addWidget(self.descriptionLabel, 0, 0, 1, 1)
		self.layout.addWidget(self.descriptionInput, 1, 0, 1, 1)
		self.layout.addWidget(self.noteLabel, 0, 1, 1, 1)
		self.layout.addWidget(self.noteInput, 1, 1, 1, 1)
		self.layout.addWidget(self.startStopButton, 2, 0, 1, 2)
		self.layout.addWidget(self.tableView, 3,0,1,2)
		self.layout.addWidget(self.pageBackwardButton, 4, 0, 1, 1)
		self.layout.addWidget(self.pageForwardButton, 4, 1, 1, 1)

		self.connect(self.descriptionInput, SIGNAL('returnPressed ()'), self.onStartStop )
		self.connect(self.noteInput, SIGNAL('returnPressed ()'), self.onStartStop )
		self.connect(self.startStopButton, SIGNAL('clicked()'), self.onStartStop )
		self.connect(self.tableView, SIGNAL('valueChanged(int)'), self.onValueChanged )
		self.connect(self.tableView, SIGNAL('del(int)'), self.onDelete )

		self.last_sync = datetime.now()
		self.sync()
Пример #7
0
    def __init__(self, parent):
        QDialog.__init__(self, parent)
        self.resize(500, 350)
        self.setMaximumSize(500, 350)
        self.gLayout =QGridLayout(self)
        self.logo = QLabel(self)
        self.logo.setPixmap(QPixmap(":/logo/data/logo.png"))
        self.gLayout.addWidget(self.logo, 0, 0, 2, 1)
        self.appName = QLabel(self)
        font = QFont()
        font.setPointSize(32)
        font.setWeight(50)
        self.appName.setFont(font)
        self.gLayout.addWidget(self.appName, 0, 1, 1, 2)
        self.appVersion = QLabel(self)
        font = QFont()
        font.setPointSize(9)
        font.setWeight(75)
        font.setBold(True)
        self.appVersion.setFont(font)
        self.appVersion.setAlignment(Qt.AlignHCenter|Qt.AlignTop)
        self.gLayout.addWidget(self.appVersion, 1, 1, 1, 2)
        self.gBox = QGroupBox(self)
        font = QFont()
        font.setPointSize(12)
        font.setWeight(75)
        font.setBold(True)
        self.gBox.setFont(font)
        self.gLayout2 = QGridLayout(self.gBox)
        self.scrollArea = QScrollArea(self.gBox)
        self.scrollArea.setFrameShape(QFrame.NoFrame)
        self.scrollArea.setWidgetResizable(True)

        self.scrollAreaWidgetContents = QWidget()
        self.scrollAreaWidgetContents.setGeometry(0, 0, 476, 199)

        self.gLayout3 = QGridLayout(self.scrollAreaWidgetContents)
        self.appHakkinda = QLabel(self.scrollAreaWidgetContents)
        font = QFont()
        font.setPointSize(9)
        font.setWeight(50)
        font.setBold(False)
        self.appHakkinda.setFont(font)
        self.appHakkinda.setWordWrap(True)
        self.gLayout3.addWidget(self.appHakkinda, 0, 0, 1, 1)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.gLayout2.addWidget(self.scrollArea, 0, 0, 1, 1)
        self.gLayout.addWidget(self.gBox, 2, 0, 2, 4)
        spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
        self.gLayout.addItem(spacerItem, 0, 3, 1, 1)
        spacerItem1 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
        self.gLayout.addItem(spacerItem1, 2, 1, 1, 2)

        self.setWindowTitle(u"Virux Hakkında")
        self.appName.setText(u"Virux")
        self.appVersion.setText(u"Sürüm %s"%QApplication.applicationVersion())
        self.gBox.setTitle(u"Hakkında")
        self.appHakkinda.setText(u"""
        <p>Virux, platform bağımsız bir antivirüs yazılımıdır :P</p>
        <p>Yazılımıın bir arayüzü yoktur. Sadece sistem çubuğunda bir tepsi oluşur. Bu tepsi animasyon şeklindedir.</p>
        <p>Rasgele zamanlarda mevcut olan dialoglardan bir tanesi ekranda gözükecektir. Sadece eğlence amacıyla yapılmıştır...</p>
        <p><b>Geliştirici:</b> Metehan Özbek - <a href='mailto:[email protected]'>[email protected]</a></p>
        <p><b>Görsel Çalışma:</b> Yasin Özcan - <a href='mailto:[email protected]'>[email protected]</a></p>
        <p><b>Katkı Yapanlar:</b> Yaşar Arabacı - <a href='mailto:[email protected]'>[email protected]</a></p>
        <p><b>Lisans:</b> GPL v3</p>
        <p></p>""")
Пример #8
0
	def __init__(self):
		QMainWindow.__init__(self)
		
		self.setWindowTitle('%s %s' % (QApplication.applicationName(), QApplication.applicationVersion()));

		self.config = ConfigHandler(os.path.join(os.path.expanduser('~'), '.pywv/pywv.cfg'), self)

		self.setStyle(QStyleFactory.create(self.config.loadStyle()))
		if self.config.loadStyleSheet():
			self.setStyleSheet(self.config.loadStyleSheet())
		else:
			self.setStyleSheet("* {}") # without any stylesheet, windowstyles won't apply


		self.setDockOptions(QMainWindow.AnimatedDocks | QMainWindow.AllowNestedDocks | QMainWindow.AllowTabbedDocks | QMainWindow.VerticalTabs);

#		self.dummy = QWidget(self)
		self.setCentralWidget(QWidget(self))

		self.pBar = QProgressBar(self)
		self.pBar.setRange(0, self.config.loadReloadInterval())
		self.pBar.setFormat("%v Sekunden")
		if not self.config.loadAutoload():
			self.pBar.hide()

		self.statusBar = QStatusBar(self)
		self.setStatusBar(self.statusBar)
		self.statusBar.addWidget(self.pBar)

		self.reloadTimer = QTimer(self);
		self.reloadTimer.setInterval(self.config.loadReloadInterval() * 1000)
		self.connect(self.reloadTimer, SIGNAL('timeout()'), self.reload_)
		if self.config.loadAutoload():
			self.reloadTimer.start()

		self.autoloadStatusTimer = QTimer(self)
		self.autoloadStatusTimer.setInterval(1000) # 1 sec
		self.connect(self.autoloadStatusTimer, SIGNAL('timeout()'), self.onAutoloadStatus)
		self.autoloadStatusTimer.start()

		self.mAction = self.menuBar().addMenu(self.tr("&Action"))
		self.mAction.addAction(self.tr("&update"), self.reload_, QKeySequence('F5'))
		self.mAction.addAction(self.tr("e&xit"), self.onExit, 'Ctrl+Q')

		self.mStyle = QMenu(self.tr("&Style"), self)
		for s in list(QStyleFactory.keys()):#       // fill in all available Styles
			self.mStyle.addAction(s)
		self.connect(self.mStyle, SIGNAL('triggered(QAction*)'), self.onStyleMenu)

		self.mOption = self.menuBar().addMenu(self.tr("&Options"))
		self.mOption.addAction(self.tr("reloadinterval") , self.onReloadTime , 'F8')
		self.mOption.addAction(self.tr("manage links")   , self.onNewLink    , 'F6')
		self.mOption.addSeparator()

		self.ontopAction       = QAction(self.tr("always on &top")  , self)
		self.showTrayAction    = QAction(self.tr("show tray &icon") , self)
		self.closeToTrayAction = QAction(self.tr("close to &tray")  , self)
		self.autoloadAction    = QAction(self.tr("auto&load")       , self)

		self.ontopAction.setCheckable(True)
		self.showTrayAction.setCheckable(True)
		self.closeToTrayAction.setCheckable(True)
		self.autoloadAction.setCheckable(True)

		self.showTrayAction.setChecked   (self.config.loadShowTray()   )
		self.ontopAction.setChecked      (self.config.loadOntop()      )
		self.closeToTrayAction.setChecked(self.config.loadCloseToTray())
		self.autoloadAction.setChecked   (self.config.loadAutoload()   )

		self.connect(self.ontopAction       , SIGNAL('toggled(bool)') , self.onOntopAction)
		self.connect(self.showTrayAction    , SIGNAL('toggled(bool)') , self.onShowTrayAction)
		self.connect(self.closeToTrayAction , SIGNAL('toggled(bool)') , self.onCloseToTrayAction)
		self.connect(self.autoloadAction    , SIGNAL('toggled(bool)') , self.onAutoloadAction)

		self.mOption.addAction(self.ontopAction)
		self.mOption.addAction(self.showTrayAction)
		self.mOption.addAction(self.closeToTrayAction)
		self.mOption.addAction(self.autoloadAction)
		self.mOption.addSeparator()
		self.mOption.addMenu(self.mStyle)

		self.trayIcon = QSystemTrayIcon(QIcon(':/appicon'), self);
		self.trayMgr = TrayManager(self.config, self.trayIcon)
		self.connect(self.trayIcon, SIGNAL('activated(QSystemTrayIcon::ActivationReason)'), self.onTrayIcon)
		if self.config.loadShowTray(): self.trayIcon.show()

		self.trayIconMenu = QMenu()
		self.trayIconMenu.addAction(self.tr("e&xit"), self.onExit)
		self.trayIcon.setContextMenu(self.trayIconMenu)

		self.mAbout = self.menuBar().addMenu(self.tr("&about"))
		self.mAbout.addAction(QApplication.applicationName(), self.onAboutAppAction)
		self.mAbout.addAction("Qt", self.onAboutQtAction)

		self.createWidgets()

		self.resize(self.config.loadWindowSize())
		self.restoreState(self.config.loadWindowState())

		if self.config.loadIsVisible():
			self.show()
			self.reload_()
Пример #9
0
	def __init__(self):
		QMainWindow.__init__(self)
		
		self.listSize = 20
		self.verbose = False

		self.timePattern = re.compile('\.[0-9]+$')
		
		self.setWindowTitle('%s %s' % (QApplication.applicationName(), QApplication.applicationVersion()));
		
		self.widget = QWidget()
		self.setCentralWidget(self.widget)

		self.statusBar = QStatusBar(self)
		self.setStatusBar(self.statusBar)

		self.mAction = self.menuBar().addMenu(self.tr("&Action"))
		#self.mAction.addAction(self.tr("&update"), self.updateTplTable(), QKeySequence('F5'))
		self.mAction.addAction(self.tr("e&xit"), self.onExit, 'Ctrl+Q')

		self.mAbout = self.menuBar().addMenu(self.tr("&about"))
		self.mAbout.addAction(QApplication.applicationName(), self.onAboutAppAction)
		self.mAbout.addAction("Qt", self.onAboutQtAction)
		
		self.pageForwardButton = QPushButton(self)
		self.pageForwardButton.setText('>')
		self.connect(self.pageForwardButton, SIGNAL('clicked()'), self.pageForward)

		self.pageBackwardButton = QPushButton(self)
		self.pageBackwardButton.setText('<')
		self.connect(self.pageBackwardButton, SIGNAL('clicked()'), self.pageBackward)
		
		self.timer = QTimer(self)
		self.timer.setInterval(1000)
		self.connect(self.timer, SIGNAL('timeout()'), self, SLOT('onTimer()'))
		self.time_begin = datetime.now()
		self.time_end = datetime.now()

		db_path = os.path.join(os.path.dirname(sys.argv[0]) if os.name != 'posix' else os.path.expanduser('~'), '.tt.db')
		self.db = sqlite3.connect(db_path)
		self.cursor = self.db.cursor()
		
		try:
			self.cursor.execute('SELECT id FROM timebrowser_record LIMIT 1')
		except:
			try:
#				print 'migrate'
#				print 'try tt'
				self.cursor.execute('SELECT id FROM tt LIMIT 1')
#				print 'may drop timebrowser_record'
				self.cursor.execute('DROP TABLE IF EXISTS timebrowser_record')
#				print 'get create statements'
				self.cursor.execute('''SELECT sql FROM sqlite_master WHERE type='table' AND name='tt' ''')
				sql1 = self.cursor.fetchone()[0].replace( ' tt ', ' timebrowser_record ' )
				self.cursor.execute('''SELECT sql FROM sqlite_master WHERE type='index' AND tbl_name='tt' ''')
				sql2 = self.cursor.fetchone()[0].replace( ' tt ', ' timebrowser_record ' )
#				print 'drop index'
				self.cursor.execute('DROP INDEX IF EXISTS idx_time_begin')
#				print 'apply create statements'
				self.cursor.execute( sql1 )
				self.cursor.execute( sql2 )
#				print 'copy data'
				self.cursor.execute( 'INSERT INTO timebrowser_record SELECT * FROM tt' )
#				print 'drop tt'
				self.cursor.execute( 'DROP TABLE tt' )
				self.statusBar.showMessage('successfully migrated Database!')
#				print 'done'
			except:# Exception, e:
#				print e
				self.createDb()
		
		self.layout = QGridLayout(self.widget)
		
		self.descriptionLabel = QLabel(self.widget)
		self.descriptionLabel.setText('Beschreibung')
		self.descriptionLabel.setMaximumHeight( self.font().pointSize() * 2 )
		self.descriptionInput = QLineEdit(self.widget)
		self.updateDescriptionEditCompleter()				
		self.noteLabel = QLabel(self.widget)
		self.noteLabel.setText('Notiz')
		self.noteLabel.setMaximumHeight( self.font().pointSize() * 2 )
		self.noteInput = QLineEdit(self.widget)
		self.startStopButton = QPushButton(self.widget)
		self.startStopButton.setText('Start')
		
		self.tableView = TplTable(self, self.listSize)

		self.pageForwardAction = QAction(self)
		self.pageForwardAction.setShortcut(QKeySequence('Right'))
		self.connect(self.pageForwardAction, SIGNAL('triggered()'), self.pageForward);
		self.pageForwardButton.addAction(self.pageForwardAction)

		self.pageBackwardAction = QAction(self)
		self.pageBackwardAction.setShortcut(QKeySequence('Left'))
		self.connect(self.pageBackwardAction, SIGNAL('triggered()'), self.pageBackward);
		self.pageBackwardButton.addAction(self.pageBackwardAction)

		self.updateTplTable()
			
		self.layout.addWidget(self.descriptionLabel, 0, 0, 1, 1)
		self.layout.addWidget(self.descriptionInput, 1, 0, 1, 1)
		self.layout.addWidget(self.noteLabel, 0, 1, 1, 1)
		self.layout.addWidget(self.noteInput, 1, 1, 1, 1)
		self.layout.addWidget(self.startStopButton, 2, 0, 1, 2)
		self.layout.addWidget(self.tableView, 3,0,1,2)
		self.layout.addWidget(self.pageBackwardButton, 4, 0, 1, 1)
		self.layout.addWidget(self.pageForwardButton, 4, 1, 1, 1)

		self.connect(self.descriptionInput, SIGNAL('returnPressed ()'), self.onStartStop )
		self.connect(self.noteInput, SIGNAL('returnPressed ()'), self.onStartStop )
		self.connect(self.startStopButton, SIGNAL('clicked()'), self.onStartStop )
		self.connect(self.tableView, SIGNAL('valueChanged(int)'), self.onValueChanged )
		self.connect(self.tableView, SIGNAL('del(int)'), self.onDelete )
Пример #10
0
    def __init__(self, parent):
        QDialog.__init__(self, parent)
        self.resize(500, 350)
        self.setMaximumSize(500, 350)
        self.gLayout = QGridLayout(self)
        self.logo = QLabel(self)
        self.logo.setPixmap(QPixmap(":/logo/data/logo.png"))
        self.gLayout.addWidget(self.logo, 0, 0, 2, 1)
        self.appName = QLabel(self)
        font = QFont()
        font.setPointSize(32)
        font.setWeight(50)
        self.appName.setFont(font)
        self.gLayout.addWidget(self.appName, 0, 1, 1, 2)
        self.appVersion = QLabel(self)
        font = QFont()
        font.setPointSize(9)
        font.setWeight(75)
        font.setBold(True)
        self.appVersion.setFont(font)
        self.appVersion.setAlignment(Qt.AlignHCenter | Qt.AlignTop)
        self.gLayout.addWidget(self.appVersion, 1, 1, 1, 2)
        self.gBox = QGroupBox(self)
        font = QFont()
        font.setPointSize(12)
        font.setWeight(75)
        font.setBold(True)
        self.gBox.setFont(font)
        self.gLayout2 = QGridLayout(self.gBox)
        self.scrollArea = QScrollArea(self.gBox)
        self.scrollArea.setFrameShape(QFrame.NoFrame)
        self.scrollArea.setWidgetResizable(True)

        self.scrollAreaWidgetContents = QWidget()
        self.scrollAreaWidgetContents.setGeometry(0, 0, 476, 199)

        self.gLayout3 = QGridLayout(self.scrollAreaWidgetContents)
        self.appHakkinda = QLabel(self.scrollAreaWidgetContents)
        font = QFont()
        font.setPointSize(9)
        font.setWeight(50)
        font.setBold(False)
        self.appHakkinda.setFont(font)
        self.appHakkinda.setWordWrap(True)
        self.gLayout3.addWidget(self.appHakkinda, 0, 0, 1, 1)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.gLayout2.addWidget(self.scrollArea, 0, 0, 1, 1)
        self.gLayout.addWidget(self.gBox, 2, 0, 2, 4)
        spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding,
                                 QSizePolicy.Minimum)
        self.gLayout.addItem(spacerItem, 0, 3, 1, 1)
        spacerItem1 = QSpacerItem(20, 40, QSizePolicy.Minimum,
                                  QSizePolicy.Expanding)
        self.gLayout.addItem(spacerItem1, 2, 1, 1, 2)

        self.setWindowTitle(u"Virux Hakkında")
        self.appName.setText(u"Virux")
        self.appVersion.setText(u"Sürüm %s" %
                                QApplication.applicationVersion())
        self.gBox.setTitle(u"Hakkında")
        self.appHakkinda.setText(u"""
        <p>Virux, platform bağımsız bir antivirüs yazılımıdır :P</p>
        <p>Yazılımıın bir arayüzü yoktur. Sadece sistem çubuğunda bir tepsi oluşur. Bu tepsi animasyon şeklindedir.</p>
        <p>Rasgele zamanlarda mevcut olan dialoglardan bir tanesi ekranda gözükecektir. Sadece eğlence amacıyla yapılmıştır...</p>
        <p><b>Geliştirici:</b> Metehan Özbek - <a href='mailto:[email protected]'>[email protected]</a></p>
        <p><b>Görsel Çalışma:</b> Yasin Özcan - <a href='mailto:[email protected]'>[email protected]</a></p>
        <p><b>Katkı Yapanlar:</b> Yaşar Arabacı - <a href='mailto:[email protected]'>[email protected]</a></p>
        <p><b>Lisans:</b> GPL v3</p>
        <p></p>""")
Пример #11
0
    def __init__(self, parent):
        QDialog.__init__(self, parent)
        self.resize(500, 350)
        self.setMaximumSize(500, 350)
        self.gLayout = QGridLayout(self)
        self.logo = QLabel(self)
        self.logo.setPixmap(QPixmap(":/resim/parcala.png"))
        self.gLayout.addWidget(self.logo, 0, 0, 2, 1)
        self.appName = QLabel(self)
        font = QFont()
        font.setPointSize(32)
        font.setWeight(50)
        self.appName.setFont(font)
        self.gLayout.addWidget(self.appName, 0, 1, 1, 2)
        self.appVersion = QLabel(self)
        font = QFont()
        font.setPointSize(9)
        font.setWeight(75)
        font.setBold(True)
        self.appVersion.setFont(font)
        self.appVersion.setAlignment(Qt.AlignHCenter|Qt.AlignTop)
        self.gLayout.addWidget(self.appVersion, 1, 1, 1, 2)
        self.gBox = QGroupBox(self)
        font = QFont()
        font.setPointSize(12)
        font.setWeight(75)
        font.setBold(True)
        self.gBox.setFont(font)
        self.gLayout2 = QGridLayout(self.gBox)
        self.scrollArea = QScrollArea(self.gBox)
        self.scrollArea.setFrameShape(QFrame.NoFrame)
        self.scrollArea.setWidgetResizable(True)

        self.scrollAreaWidgetContents = QWidget()
        self.scrollAreaWidgetContents.setGeometry(0, 0, 476, 199)

        self.gLayout3 = QGridLayout(self.scrollAreaWidgetContents)
        self.appHakkinda = QLabel(self.scrollAreaWidgetContents)
        font = QFont()
        font.setPointSize(9)
        font.setWeight(50)
        font.setBold(False)
        self.appHakkinda.setFont(font)
        self.appHakkinda.setWordWrap(True)
        self.gLayout3.addWidget(self.appHakkinda, 0, 0, 1, 1)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.gLayout2.addWidget(self.scrollArea, 0, 0, 1, 1)
        self.gLayout.addWidget(self.gBox, 2, 0, 2, 4)
        spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
        self.gLayout.addItem(spacerItem, 0, 3, 1, 1)
        spacerItem1 = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
        self.gLayout.addItem(spacerItem1, 2, 1, 1, 2)

        self.setWindowTitle(self.trUtf8(u"%s Hakkında"%QApplication.applicationName()))
        self.appName.setText(self.trUtf8(u"%s"%QApplication.applicationName()))
        self.appVersion.setText(self.trUtf8(u"Sürüm %s"%QApplication.applicationVersion()))
        self.gBox.setTitle(self.trUtf8("Hakkında"))
        self.appHakkinda.setText(self.trUtf8("""
        <p>Parçala, Hj-Split ile aynı işi yapan dosya parçalama ve birleştirme yazılımıdır.</p>
        <p>Parçala, büyük boyutlu dosyaları parçalara böldüğü gibi parçalanmış dosyaları birleştirme ve dosyaların doğrulamasını yapabilmektedir.</p>

        <p><b>Geliştirici:</b> Metehan Özbek - <a href='mailto:[email protected]'>[email protected]</a></p>
        <p><b>Görsel Çalışma:</b> Yasin Özcan - <a href='mailto:[email protected]'>[email protected]</a></p>
        <p><b>Lisans:</b> GPL v3</p>
        <p></p>"""))