Example #1
0
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

        if not name:
            self.setName("WaitDlg")

        self.setCaption(_("Retrieving..."))

        self.label = QLabel(self,"label")
        self.label.setGeometry(QRect(30,20,291,80))
        self.label.setText(_("Retrieving data from server...\n"
                           "Please wait"))
       
        self.setFixedSize(354, 115)
        self.resize(QSize(354,115).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)
        self.setModal(True)
Example #2
0
 def draw_gnuplotbar(self,raw_file_name,data_str):
         caption = raw_file_name.strip()
         file_name = "/tmp/%s"%raw_file_name.strip()
         command = "mkbar %s"%file_name
         pipe_in , pipe_out = os.popen2(command, "wr");
         pipe_in.write(data_str);
         pipe_in.write("\n"); 
         pipe_in.flush() 
         ourstring = pipe_out.readline(); 
         if ourstring:
             dlg = Data_visual(self,filename = ourstring,Caption = _(caption))
             dlg.run()
Example #3
0
 def security_item_select(self,string):
     self.shortparam = ['']
     if string == _('summary'):
        pass
     if string == _('logins'):
        self.shortparam.append('l')
     if string == _('events'):
        self.shortparam.append('e')
     if string == _('users'):
        self.shortparam.append('u')
     if string == _('terminals'):
        self.shortparam.append('tm')
     if string == _('syscalls'):
        self.shortparam.append('s')
     if string == _('hosts'):
        self.shortparam.append('h')
     if string == _('executables'):
        self.shortparam.append('x')
     if string == _('responses to anomaly events'):
        self.shortparam.append('r')
     self.data_visual_button.setEnabled(False)
     self.security_tb.clear()
Example #4
0
    def new_game(self):
        """
        Go to new game state.

        -Initializes world for a new game.
        -Retrieves current level #1
        -Adds welcome message
        """
        self.state = STATES['PLAYING']

        self.curl = self.world.new_game()
        self.curp = self.world.players[0]
        self.curp.ini_fov_map()
        self.curp.compute_fov_map()

        self.util.add_message(_("Welcome to RogueLike Guest!"), MESSAGETYPES['SUCCESS'])
        if util.debug:
            self.util.add_message("x:%d,y:%d" % (self.curp.x, self.curp.y), MESSAGETYPES['ALERT'])

        self.ui.refresh_map(self.curl[0], self.curp.x, self.curp.y, self.curp.fov_map,self)
Example #5
0
    def data_visual(self):
        plot_done = False

        index = self.security_items.currentItem() 
        raw_file_name = filename_turple[index]
        filename = caption = raw_file_name.strip()
        fname = "/tmp/%s"%filename
        fname += ".png"

        th = threading.Thread(target = self.draw_plot,args=(fname,caption))
        th.start()

        while not self.plot_done:
            qApp.processEvents()

        threading.Thread.join(th)


        if self.close_canvas():
            dlg = Data_visual(self,filename = fname ,Caption = _(caption))
            dlg.run(filename = fname)
Example #6
0
 def languageChange(self):
     self.setCaption(_("Data Visualization"))
     self.draw_label.setText(QString.null)
Example #7
0
 def languageChange(self):
     self.setCaption(_("Security Report"))
     self.secreport_label.setText(_("<b>Security Report Type :</b>"))
     self.security_items.clear()
     self.security_items.insertItem(_("summary"))
     self.security_items.insertItem(_("logins"))
     self.security_items.insertItem(_("events"))
     self.security_items.insertItem(_("users"))
     self.security_items.insertItem(_("terminals"))
     self.security_items.insertItem(_("syscalls"))
     self.security_items.insertItem(_("hosts"))
     self.security_items.insertItem(_("executables"))
     self.security_items.insertItem(_("responses to anomaly events"))
     self.textLabel1.setText(_("<b>Query Status :</b>"))
     self.buttonGroup1.setTitle(QString.null)
     self.All_radiobtn.setText(_("All"))
     self.Success_radiobtn.setText(_("Success"))
     self.Failed_radiobtn.setText(_("Failed"))
     self.query_button.setText(_("query"))
     self.data_visual_button.setText(_("Data Visualization"))