def __init__(self, parent_win): GUILibraries.QDialog.__init__(self, parent_win) self.Fixity = SharedApp.SharedApp.App self.setWindowTitle('About Fixity') self.parent_win = parent_win self.setWindowModality(GUILibraries.Qt.WindowModal) self.parent_win.setWindowTitle('About Fixity') singleMessage.version = self.Fixity.Configuration.getApplicationVersion() self.setWindowIcon(GUILibraries.QIcon(self.Fixity.Configuration.getLogoSignSmall())) self.AboutFixityLayout =GUILibraries.QVBoxLayout() self.widget = GUILibraries.QWidget(self) self.pgroup = GUILibraries.QGroupBox() self.detail_layout = GUILibraries.QVBoxLayout() self.description_btn = GUILibraries.QPushButton('Description') self.author_and_license_btn = GUILibraries.QPushButton('Author and License') self.contact_btn = GUILibraries.QPushButton('Contact') self.close_btn = GUILibraries.QPushButton('Close') self.about_layout =GUILibraries.QGroupBox() self.heading = GUILibraries.QTextEdit() self.content = GUILibraries.QTextEdit() self.heading.setReadOnly(True) self.content.setReadOnly(True) self.main = GUILibraries.QHBoxLayout() self.notification = GUILibraries.NotificationGUI.NotificationGUI()
def createProjectListingOption(self): self.widget = GUILibraries.QWidget(self) self.pgroup = GUILibraries.QGroupBox("Projects") self.project_layout = GUILibraries.QVBoxLayout() self.projects = GUILibraries.QListWidget(self) self.projects.setFixedSize(115, 190) self.projects.setCurrentRow(0) self.project_layout.addWidget(self.projects) self.pgroup.setLayout(self.project_layout) self.projects.itemSelectionChanged.connect(self.update)
def SetDesgin(self): ''' All design Management Done in Here''' try: self.description_btn.setFixedSize(210, 30) self.author_and_license_btn.setFixedSize(210, 30) self.contact_btn.setFixedSize(210, 30) except: self.description_btn =GUILibraries.QPushButton('Description') self.author_and_license_btn =GUILibraries.QPushButton('Author and License') self.contact_btn =GUILibraries.QPushButton('Contact') self.close_btn =GUILibraries.QPushButton('Close') pic =GUILibraries.QLabel(self) pic.setGeometry(30, 30, 500, 600) pic.setFixedSize(400,400) '''use full ABSOLUTE path to the image, not relative''' pic.setPixmap(GUILibraries.QPixmap(self.Fixity.Configuration.getLogoSignSmall())) self.description_btn.clicked.connect(self.showDescription) self.author_and_license_btn.clicked.connect(self.showLicense) self.contact_btn.clicked.connect(self.showContact) self.close_btn.clicked.connect(self.Cancel) self.detail_layout.addWidget(self.description_btn) self.detail_layout.addWidget(self.author_and_license_btn) self.detail_layout.addWidget(self.contact_btn) self.detail_layout.addWidget(pic) self.pgroup.setLayout(self.detail_layout) slay =GUILibraries.QVBoxLayout() if OS_Info == 'Windows': self.heading.setFixedSize(485,40) self.content.setFixedSize(485,500) else: self.heading.setFixedSize(500,40) self.content.setFixedSize(500,500) slay.addWidget(self.heading) slay.addWidget(self.content) self.close_btn.setFixedSize(200,30) slay.addWidget(self.close_btn) if OS_Info == 'Windows': self.about_layout.setFixedSize(495, 600) else: self.about_layout.setFixedSize(540, 600) self.pgroup.setFixedSize(255, 600) self.main.addWidget(self.pgroup) self.main.addWidget(self.about_layout) self.about_layout.setLayout(slay) self.setLayout(self.main) self.showDescription()
def __init__(self, parent_win): super(ChangeNameGUI, self).__init__(parent_win) self.Fixity = SharedApp.SharedApp.App self.parent_win = parent_win self.setWindowModality(GUILibraries.Qt.WindowModal) self.setWindowTitle('Change Project Name') self.parent_win.setWindowTitle('Change Project Name') self.setWindowIcon( GUILibraries.QIcon(r'' + (str( (self.Fixity.Configuration.getLogoSignSmall()))))) self.change_name_layout = GUILibraries.QVBoxLayout() self.notification = GUILibraries.NotificationGUI.NotificationGUI()
def __init__(self, parent_win): GUILibraries.QDialog.__init__(self, parent_win) self.Fixity = SharedApp.SharedApp.App self.parent_win = parent_win self.setWindowTitle('Configure Sender Email') self.setWindowModality(GUILibraries.Qt.WindowModal) self.parent_win.setWindowTitle('Configure Sender Email') self.email_notification = EmailNotification.EmailNotification() self.setWindowIcon( GUILibraries.QIcon( str(self.Fixity.Configuration.getLogoSignSmall()))) self.email_pref_layout = GUILibraries.QVBoxLayout() self.notification = GUILibraries.NotificationGUI.NotificationGUI()
def __init__(self, parent_win): GUILibraries.QDialog.__init__(self, parent_win) self.Fixity = SharedApp.SharedApp.App self.parent_win = parent_win self.setWindowModality(GUILibraries.Qt.WindowModal) self.parent_win.setWindowTitle('Filter File') self.setWindowTitle('Filter File') self.setWindowIcon( GUILibraries.QIcon(r'' + (str( (self.Fixity.Configuration.getLogoSignSmall()))))) self.filter_files_layout = GUILibraries.QVBoxLayout() self.notification = GUILibraries.NotificationGUI.NotificationGUI()
def __init__(self, parent_win): GUILibraries.QDialog.__init__(self, parent_win) self.parent_win = parent_win self.setWindowModality(GUILibraries.Qt.WindowModal) self.Fixity = SharedApp.SharedApp.App self.setWindowTitle('Checksum Manager') self.parent_win.setWindowTitle('Checksum Manager') self.setWindowIcon( GUILibraries.QIcon(r'' + (str( (self.Fixity.Configuration.getLogoSignSmall()))))) self.change_algorithm_layout = GUILibraries.QVBoxLayout() self.is_method_changed = False self.is_all_files_confirmed = False self.notification = GUILibraries.NotificationGUI.NotificationGUI()
def __init__(self, parent_win, orignal_path_text='', change_path_text='', code=''): GUILibraries.QDialog.__init__(self, parent_win) self.Fixity = SharedApp.SharedApp.App self.parent_win = parent_win self.path_change_win = GUILibraries.QDialog(self.parent_win) self.path_change_win.setWindowModality(GUILibraries.Qt.WindowModal) self.path_change_win.setWindowTitle('Change Directory') self.setWindowIcon( GUILibraries.QIcon(r'' + (str( (self.Fixity.Configuration.getLogoSignSmall()))))) self.path_change_layout = GUILibraries.QVBoxLayout() self.orignal_path_text = orignal_path_text self.change_path_text = change_path_text self.code = code self.notification = GUILibraries.NotificationGUI.NotificationGUI()
def __init__(self, parent_win): GUILibraries.QDialog.__init__( self, parent_win, GUILibraries.Qt.CustomizeWindowHint | GUILibraries.Qt.WindowTitleHint | GUILibraries.Qt.WindowMinMaxButtonsHint) self.setWindowTitle('Scanner Console') #GUILibraries.Qt.CustomizeWindowHint | GUILibraries.Qt.WindowTitleHint | GUILibraries.Qt.WindowMinMaxButtonsHint self.setWindowModality(GUILibraries.Qt.WindowModal) #self.setWindowModality(GUILibraries.Qt.CustomizeWindowHint | GUILibraries.Qt.WindowTitleHint | GUILibraries.Qt.WindowMinMaxButtonsHint) self.Fixity = SharedApp.SharedApp.App self.setWindowIcon( GUILibraries.QIcon(self.Fixity.Configuration.getLogoSignSmall())) self.lay = GUILibraries.QVBoxLayout(self) self.te = GUILibraries.QTextEdit(self) self.te.setReadOnly(True) self.lay.addWidget(self.te) self.setLayout(self.lay) if self.Fixity.Configuration.getOsType() == 'linux': sys.stdout = Printer(self.te) self.resize(800, 300) self.show() self.AddText('Started Scanning ..... !') self._want_to_close = False
def createDirectories(self): self.mail_layout = GUILibraries.QVBoxLayout() self.mail_layout.setSpacing(0) self.mail_text_fields = [] self.dirs_layout = GUILibraries.QVBoxLayout() self.dirs_layout.setSpacing(0) self.dirs_text_fields, self.browse_dirs, self.bin_of_dirs = [], [], [] for n in xrange( 0, self.Fixity.Configuration.getNumberOfPathDirectories()): hbox = GUILibraries.QHBoxLayout() hbox.setContentsMargins(0, 0, 0, 0) hbox.setSpacing(0) self.dirs_text_fields.append(GUILibraries.QLineEdit()) self.browse_dirs.append(GUILibraries.QPushButton('...')) self.bin_of_dirs.append(GUILibraries.QPushButton('X')) self.browse_dirs[n].setFixedSize(30, 21) self.dirs_text_fields[n].setContentsMargins(0, 2, 7, 0) self.dirs_text_fields[n].setFixedSize(150, 22) self.bin_of_dirs[n].setFixedSize(25, 22) self.bin_of_dirs[n].setStyleSheet( 'QPushButton {color: red; font: bold} ') self.browse_dirs[n].clicked.connect(self.pickDir) self.dirs_text_fields[n].textChanged.connect(self.changed) self.bin_of_dirs[n].clicked.connect(self.removeDirs) hbox.addWidget(self.dirs_text_fields[n]) hbox.addWidget(self.browse_dirs[n]) hbox.addWidget(self.bin_of_dirs[n]) self.dirs_layout.addLayout(hbox) self.mail_text_fields.append(GUILibraries.QLineEdit()) self.mail_layout.addWidget(self.mail_text_fields[n]) self.dirs_text_fields[n].setReadOnly(True) self.dirs = GUILibraries.QGroupBox("Directories") self.dirs.setFixedSize(273, 289) self.mail = GUILibraries.QGroupBox("Recipient Email Addresses") self.dirs.setLayout(self.dirs_layout) self.mail.setLayout(self.mail_layout) self.main = GUILibraries.QHBoxLayout() self.main.addWidget(self.pgroup) self.main.addWidget(self.scheduling_groupBox) self.main.addWidget(self.dirs) self.main.addWidget(self.mail) self.widget.setLayout(self.main) self.setCentralWidget(self.widget) self.run_only_on_ac_power.setDisabled(False) self.start_when_available.setDisabled(False) self.email_only_when_something_changed.setDisabled(False) self.toggleEmailFields() if len(self.Fixity.ProjectsList) <= 0: self.togglerMenu(True)
def creatSchedulingOptions(self): self.scheduling_groupBox = GUILibraries.QGroupBox("Scheduling") self.monthly = GUILibraries.QRadioButton("Monthly") self.weekly = GUILibraries.QRadioButton("Weekly") self.daily = GUILibraries.QRadioButton("Daily") self.run_only_on_ac_power = GUILibraries.QCheckBox( "Run when on battery power") self.start_when_available = GUILibraries.QCheckBox( "If missed, run upon restart") self.email_only_when_something_changed = GUILibraries.QCheckBox( "Email only upon warning or failure") self.run_only_on_ac_power.clicked.connect(self.changed) self.start_when_available.clicked.connect(self.changed) self.email_only_when_something_changed.clicked.connect(self.changed) self.run_only_on_ac_power.setChecked(True) self.start_when_available.setChecked(True) self.email_only_when_something_changed.setChecked(True) self.monthly.clicked.connect(self.monthClick) self.weekly.clicked.connect(self.weekClick) self.daily.clicked.connect(self.dayClick) self.switchDebugger(True) self.scheduling_layout = GUILibraries.QVBoxLayout() self.scheduling_layout.addWidget(self.monthly) self.scheduling_layout.addWidget(self.weekly) self.scheduling_layout.addWidget(self.daily) self.scheduler_run_time = GUILibraries.QLabel("Scheduler Run Time: ") self.scheduling_layout.addWidget(self.scheduler_run_time) self.timer = GUILibraries.QTimeEdit(GUILibraries.QTime()) self.timer.setDisplayFormat(self.Fixity.Configuration.getTimeFormat()) self.scheduling_layout.addWidget(self.timer) self.scheduler_run_on = GUILibraries.QLabel("Scheduler Run On: ") self.scheduling_layout.addWidget(self.scheduler_run_on) self.day_of_week = GUILibraries.QComboBox() self.day_of_week.addItems(self.Fixity.Configuration.getWeekDays()) self.day_of_week.activated.connect(self.changed) self.scheduling_layout.addWidget(self.day_of_week) self.day_of_week.hide() self.day_of_month = GUILibraries.QSpinBox() self.day_of_month.setMaximum(31) self.day_of_month.setMinimum(1) self.day_of_month.valueChanged.connect(self.changed) self.scheduling_layout.addWidget(self.day_of_month) self.day_of_month.hide() self.spacer = GUILibraries.QSpacerItem(125, 30) self.scheduling_layout.addItem(self.spacer) system_information = self.Fixity.Configuration.getWindowsInformation() if self.Fixity.Configuration.getOsType() == 'Windows' and ( str(system_information['WindowsType']) == '7' or str(system_information['WindowsType']) == '10' or str(system_information['WindowsType']) == '8'): self.scheduling_layout.addWidget(self.run_only_on_ac_power) self.scheduling_layout.addWidget(self.start_when_available) self.scheduling_layout.addWidget( self.email_only_when_something_changed) self.lastrun = GUILibraries.QLabel("Last checked: ") self.scheduling_layout.addWidget(self.lastrun) self.scheduling_groupBox.setLayout(self.scheduling_layout) self.scheduling_groupBox.setFixedSize(260, 289)