Changeset 3567:a55528be13a5 in orange


Ignore:
Timestamp:
04/23/07 01:26:23 (7 years ago)
Author:
mitar
Branch:
default
Convert:
531b582ba42ab0398812b869788e9c839c52f8ca
Message:

Removed Qt from windows captions.

Location:
orange
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeCanvas/orngCanvas.pyw

    r3564 r3567  
    1212        self.ctrlPressed = 0    # we have to save keystate, so that orngView can access information about keystate 
    1313        self.debugMode = 1        # print extra output for debuging 
    14         self.setCaption("Qt Orange Canvas") 
     14        if (int(qVersion()[0]) >= 3): 
     15            self.setCaption("Orange Canvas") 
     16        else: 
     17            self.setCaption("Qt Orange Canvas") 
    1518        self.windows = []    # list of id for windows in Window menu 
    1619        self.windowsDict = {}    # dict. with id:menuitem for windows in Window menu 
  • orange/OrangeCanvas/orngDlgs.py

    r3563 r3567  
    244244        # GUI 
    245245        self.resize(515,286) 
    246         self.setName('Qt Connect Signals') 
    247         self.setCaption(self.tr("Qt Connect Signals")) 
     246        if (int(qVersion()[0]) >= 3): 
     247            self.setName('Connect Signals') 
     248            self.setCaption(self.tr("Connect Signals")) 
     249        else: 
     250            self.setName('Qt Connect Signals') 
     251            self.setCaption(self.tr("Qt Connect Signals")) 
    248252 
    249253        self.grid = QGridLayout( 2, 1 ) 
     
    461465        apply(QDialog.__init__,(self,) + args) 
    462466        self.canvasDlg = canvasDlg 
    463         if sys.platform == "darwin": 
    464             self.setCaption("Qt Preferences") 
     467        if (int(qVersion()[0]) >= 3): 
     468            if sys.platform == "darwin": 
     469                self.setCaption("Preferences") 
     470            else: 
     471                self.setCaption("Canvas Options") 
    465472        else: 
    466             self.setCaption("Qt Canvas Options") 
     473            if sys.platform == "darwin": 
     474                self.setCaption("Qt Preferences") 
     475            else: 
     476                self.setCaption("Qt Canvas Options") 
    467477        #self.controlArea = QVBoxLayout (self) 
    468478        self.topLayout = QVBoxLayout( self, 10 ) 
     
    683693        apply(QDialog.__init__,(self,) + args) 
    684694        self.canvasDlg = canvasDlg 
    685         self.setCaption("Qt Widget Shortcuts") 
     695        if (int(qVersion()[0]) >= 3): 
     696            self.setCaption("Widget Shortcuts") 
     697        else: 
     698            self.setCaption("Qt Widget Shortcuts") 
    686699        self.topLayout = QVBoxLayout( self, 10 ) 
    687700        self.resize(500,500) 
     
    867880 
    868881    def addNewSignal(self): 
    869         (Qstring,ok) = QInputDialog.getText("Qt Add New Channel Name", "Enter new symbolic channel name") 
     882        if (int(qVersion()[0]) >= 3): 
     883            (Qstring,ok) = QInputDialog.getText("Add New Channel Name", "Enter new symbolic channel name") 
     884        else: 
     885            (Qstring,ok) = QInputDialog.getText("Qt Add New Channel Name", "Enter new symbolic channel name") 
    870886        string = str(Qstring) 
    871887        if ok: 
     
    906922    def __init__(self, *args): 
    907923        apply(QDialog.__init__,(self,) + args) 
    908         self.setCaption("Qt Set widget order") 
     924        if (int(qVersion()[0]) >= 3): 
     925            self.setCaption("Set Widget Order") 
     926        else: 
     927            self.setCaption("Qt Set Widget Order") 
    909928        self.shownWidgetList = [] 
    910929        self.hiddenWidgetList = [] 
  • orange/OrangeCanvas/orngDoc.py

    r3519 r3567  
    287287            caption = caption + " (" + str(i) + ")" 
    288288        newwidget.updateText(caption) 
    289         newwidget.instance.setCaptionTitle("Qt " + caption) 
     289        if (int(qVersion()[0]) >= 3): 
     290            newwidget.instance.setCaptionTitle(caption) 
     291        else: 
     292            newwidget.instance.setCaptionTitle("Qt " + caption) 
    290293 
    291294        # show the widget and activate the settings 
     
    609612                signals += "self.ow%s.setEventHandler(self.eventHandler)\n" % (name) +t+t + "self.ow%s.setProgressBarHandler(self.progressHandler)\n" % (name) +t+t 
    610613                icons += "self.ow%s.setWidgetIcon('%s')\n" % (name, widget.widget.getIconName()) + t+t 
    611                 captions  += "self.ow%s.setCaptionTitle('Qt %s')\n" %(name, widget.caption) +t+t 
     614                captions  += "if (int(qVersion()[0]) >= 3):\n" +t+t+t + "self.ow%s.setCaptionTitle('%s')\n" %(name, widget.caption) +t+t "else:\n" +t+t+t "self.ow%s.setCaptionTitle('Qt %s')\n" %(name, widget.caption) +t+t 
    612615                manager += "self.signalManager.addWidget(self.ow%s)\n" %(name) +t+t 
    613616                tabs += """self.tabs.insertTab (self.ow%s, "%s")\n""" % (name , widget.caption) +t+t 
     
    666669    def __init__(self,parent=None, debugMode = DEBUG_MODE, debugFileName = "signalManagerOutput.txt", verbosity = 1): 
    667670        QVBox.__init__(self,parent) 
    668         self.setCaption("Qt %s") 
     671        caption = %s 
     672        if (int(qVersion()[0]) >= 3): 
     673            self.setCaption(caption) 
     674        else: 
     675            self.setCaption("Qt " + caption) 
    669676        self.signalManager = orngSignalManager.SignalManager(debugMode, debugFileName, verbosity) 
    670677        self.verbosity = verbosity""" % (fileName) 
  • orange/OrangeCanvas/orngView.py

    r3495 r3567  
    6464    def renameActiveWidget(self): 
    6565        exName = str(self.tempWidget.caption) 
    66         (newName ,ok) = QInputDialog.getText("Qt Rename Widget", "Enter new name for the widget \"" + exName + "\":", exName) 
     66        if (int(qVersion()[0]) >= 3): 
     67            (newName ,ok) = QInputDialog.getText("Rename Widget", "Enter new name for the widget \"" + exName + "\":", exName) 
     68        else: 
     69            (newName ,ok) = QInputDialog.getText("Qt Rename Widget", "Enter new name for the widget \"" + exName + "\":", exName) 
    6770        newName = str(newName) 
    6871        if ok and self.tempWidget != None and newName != exName: 
     
    7477            self.tempWidget.updateTooltip() 
    7578            self.tempWidget.updateLinePosition() 
    76             if len(newName) < 3 or newName[:2].lower() != "qt": 
     79            if (int(qVersion()[0]) < 3) and len(newName) < 3 or newName[:2].lower() != "qt": 
    7780                newName = "Qt " + newName 
    7881            self.tempWidget.instance.setCaption(newName) 
  • orange/OrangeWidgets/OWBaseWidget.py

    r3563 r3567  
    8282 
    8383class OWBaseWidget(QDialog): 
    84     def __init__(self, parent = None, signalManager = None, title="Qt Orange BaseWidget", modal=FALSE, savePosition = False): 
     84    def __init__(self, parent = None, signalManager = None, title="Orange BaseWidget", modal=FALSE, savePosition = False): 
    8585        # the "currentContexts" MUST be the first thing assigned to a widget 
    8686        self.currentContexts = {} 
     
    128128 
    129129        # if we want the widget to show the title then the title must start with "Qt" 
    130         if self.captionTitle[:2].upper() != "QT": 
     130        if (int(qVersion()[0]) < 3) and self.captionTitle[:2].upper() != "QT": 
    131131            self.captionTitle = "Qt " + self.captionTitle 
    132132 
  • orange/OrangeWidgets/OWClusterOptimization.py

    r3413 r3567  
    6262        self.parentWidget = parentWidget 
    6363        self.parentName = parentName 
    64         self.setCaption("Qt Cluster Dialog") 
     64        if (int(qVersion()[0]) >= 3): 
     65            self.setCaption("Cluster Dialog") 
     66        else: 
     67            self.setCaption("Qt Cluster Dialog") 
    6568        self.controlArea = QVBoxLayout(self) 
    6669 
     
    418421            self.pointStabilityCount = [0 for i in range(len(self.rawdata.domain.classVar.values))]       # for each class value create a counter that will count the number of clusters for it 
    419422             
    420             (text, ok) = QInputDialog.getText('Qt Projection count', 'How many of the best projections do you want to consider?') 
     423            if (int(qVersion()[0]) >= 3): 
     424                (text, ok) = QInputDialog.getText('Projection count', 'How many of the best projections do you want to consider?') 
     425            else: 
     426                (text, ok) = QInputDialog.getText('Qt Projection count', 'How many of the best projections do you want to consider?') 
    421427            if not ok: return 
    422428            nrOfProjections = int(str(text))  
     
    687693    # ############################################################## 
    688694    def exportMultipleGraphs(self): 
    689         (text, ok) = QInputDialog.getText('Qt Graph count', 'How many of the best projections do you wish to save?') 
     695        if (int(qVersion()[0]) >= 3): 
     696            (text, ok) = QInputDialog.getText('Graph count', 'How many of the best projections do you wish to save?') 
     697        else: 
     698            (text, ok) = QInputDialog.getText('Qt Graph count', 'How many of the best projections do you wish to save?') 
    690699        if not ok: return 
    691700        self.bestGraphsCount = int(str(text)) 
  • orange/OrangeWidgets/OWMosaicOptimization.py

    r3494 r3567  
    3232        self.resize(375,620) 
    3333 
    34         self.setCaption("Qt Mosaic Optimization Dialog") 
     34        if (int(qVersion()[0]) >= 3): 
     35            self.setCaption("Mosaic Optimization Dialog") 
     36        else: 
     37            self.setCaption("Qt Mosaic Optimization Dialog") 
    3538        self.controlArea = QVBoxLayout(self) 
    3639 
  • orange/OrangeWidgets/OWWidget.py

    r3563 r3567  
    88 
    99class OWWidget(OWBaseWidget): 
    10     def __init__( self, parent = None, signalManager = None, title = "Qt Orange Widget", wantGraph = FALSE, wantStatusBar = FALSE, savePosition = True, noReport = False): 
     10    def __init__( self, parent = None, signalManager = None, title = "Orange Widget", wantGraph = FALSE, wantStatusBar = FALSE, savePosition = True, noReport = False): 
    1111        """ 
    1212        Initialization 
  • orange/OrangeWidgets/OWkNNOptimization.py

    r3563 r3567  
    2929        self.parentName = parentName 
    3030        self.visualizationMethod = visualizationMethod 
    31         self.setCaption("Qt VizRank Optimization Dialog") 
     31        if (int(qVersion()[0]) >= 3): 
     32            self.setCaption("VizRank Optimization Dialog") 
     33        else: 
     34            self.setCaption("Qt VizRank Optimization Dialog") 
    3235        self.controlArea = QVBoxLayout(self) 
    3336 
     
    322325    def removeTooSimilarProjections(self, allowedPercentOfEqualAttributes = -1): 
    323326        if allowedPercentOfEqualAttributes == -1: 
    324             (text, ok) = QInputDialog.getText('Qt Allowed Similarity', 'How many attributes can be present in some better projection for a projection to be still considered as different (in pecents. Default = 70)?') 
     327            if (int(qVersion()[0]) >= 3): 
     328                (text, ok) = QInputDialog.getText('Allowed Similarity', 'How many attributes can be present in some better projection for a projection to be still considered as different (in pecents. Default = 70)?') 
     329            else: 
     330                (text, ok) = QInputDialog.getText('Qt Allowed Similarity', 'How many attributes can be present in some better projection for a projection to be still considered as different (in pecents. Default = 70)?') 
    325331            if not ok: return 
    326332            allowedPercentOfEqualAttributes = int(str(text)) 
     
    669675    # exporting multiple pictures 
    670676    def exportMultipleGraphs(self): 
    671         (text, ok) = QInputDialog.getText('Qt Graph count', 'How many of the best projections do you wish to save?') 
     677        if (int(qVersion()[0]) >= 3): 
     678            (text, ok) = QInputDialog.getText('Graph count', 'How many of the best projections do you wish to save?') 
     679        else: 
     680            (text, ok) = QInputDialog.getText('Qt Graph count', 'How many of the best projections do you wish to save?') 
    672681        if not ok: return 
    673682        self.bestGraphsCount = int(str(text)) 
     
    16101619 
    16111620        if self.projectionCount == "Other...": 
    1612             (text, ok) = QInputDialog.getText('Qt Projection Count', 'How many of the best projections do you wish to consider?') 
     1621            if (int(qVersion()[0]) >= 3): 
     1622                (text, ok) = QInputDialog.getText('Projection Count', 'How many of the best projections do you wish to consider?') 
     1623            else: 
     1624                (text, ok) = QInputDialog.getText('Qt Projection Count', 'How many of the best projections do you wish to consider?') 
    16131625            if ok and str(text).isdigit(): 
    16141626                text = str(text) 
  • orange/OrangeWidgets/Prototypes/OWInfo.py

    r1494 r3567  
    3636 
    3737        # if we want the widget to show the title then the title must start with "Qt" 
    38         if self.captionTitle[:2].upper != "QT": self.captionTitle = "Qt " + self.captionTitle 
     38        if (int(qVersion()[0]) < 3) and self.captionTitle[:2].upper != "QT": self.captionTitle = "Qt " + self.captionTitle 
    3939             
    4040        #the title 
  • orange/OrangeWidgets/Regression/OWRegressionTreeViewer2D.py

    r3476 r3567  
    150150        self.canvasView.setNavigator(self.treeNav) 
    151151        self.navWidget.resize(400,400) 
    152         self.navWidget.setCaption("Qt Navigator") 
     152        if (int(qVersion()[0]) >= 3): 
     153            self.navWidget.setCaption("Navigator") 
     154        else: 
     155            self.navWidget.setCaption("Qt Navigator") 
    153156        self.setMouseTracking(True) 
    154157 
  • orange/OrangeWidgets/Visualize/OWParallelCoordinates.py

    r3549 r3567  
    388388        OWBaseWidget.__init__(self, parent, signalManager, "Parallel Optimization Dialog", FALSE) 
    389389 
    390         self.setCaption("Qt Parallel Optimization Dialog") 
     390        if (int(qVersion()[0]) >= 3): 
     391            self.setCaption("Parallel Optimization Dialog") 
     392        else: 
     393            self.setCaption("Qt Parallel Optimization Dialog") 
    391394        self.topLayout = QVBoxLayout( self, 10 ) 
    392395        self.grid=QGridLayout(4,2) 
  • orange/updateOrange.py

    r3563 r3567  
    2727    def __init__(self, settings, *args): 
    2828        apply(QDialog.__init__,(self,) + args) 
    29         self.setCaption("Qt Update Options") 
     29        if (int(qVersion()[0]) >= 3): 
     30            self.setCaption("Update Options") 
     31        else: 
     32            self.setCaption("Qt Update Options") 
    3033 
    3134        if self.layout(): 
     
    8790        self.groupBoxLayout.setMargin(20) 
    8891                 
    89         self.setCaption("Qt Select Folders") 
     92        if (int(qVersion()[0]) >= 3): 
     93            self.setCaption("Select Folders") 
     94        else: 
     95            self.setCaption("Qt Select Folders") 
    9096        self.resize(300,100) 
    9197         
     
    134140        apply(QMainWindow.__init__,(self,) + args) 
    135141        self.resize(600,600) 
    136         self.setCaption("Qt Orange Update") 
     142        if (int(qVersion()[0]) >= 3): 
     143            self.setCaption("Orange Update") 
     144        else: 
     145            self.setCaption("Qt Orange Update") 
    137146        self.toolbar = QToolBar(self, 'toolbar') 
    138147        self.statusBar = QStatusBar(self) 
Note: See TracChangeset for help on using the changeset viewer.