def createCustomWidgets(self): self.dwWidgets = pDockWidget( self ) self.dwWidgets.setObjectName( "dwWidgets" ) self.dwWidgets.toggleViewAction().setObjectName( "dwWidgetsViewAction" ) self.dockToolBar( Qt.LeftToolBarArea ).addDockWidget( self.dwWidgets, self.tr( "Custom Widgets" ), QIcon( pGuiUtils.scaledPixmap( ":/fresh/country-flags/es.png", QSize( 96, 96 ) ) ) ) self.dwWidgetsContents = QWidget( self ) self.dwWidgetsContentsLayout = QGridLayout( self.dwWidgetsContents ) self.dwWidgets.setWidget( self.dwWidgetsContents ) pbOpenFile = QPushButton( self.tr( "Get open file names" ), self ) self.dwWidgetsContentsLayout.addWidget( pbOpenFile, 0, 0 ) pbOpenFile.clicked.connect(self.openFileDialog) pbOpenDirectory = QPushButton( self.tr( "Get open directory name" ), self ) self.dwWidgetsContentsLayout.addWidget( pbOpenDirectory, 1, 0 ) pbOpenDirectory.clicked.connect(self.openDirectoryDialog) pbQueuedMessage = QPushButton( self.tr( "Add queued message" ) ) self.dwWidgetsContentsLayout.addWidget( pbQueuedMessage, 2, 0 ) pbQueuedMessage.clicked.connect(self.addQueuedMessage) stylesButton = pStylesToolButton( self.dwWidgetsContents ) stylesButton.setSizePolicy( pbQueuedMessage.sizePolicy() ) stylesButton.setCheckableActions( False ) self.dwWidgetsContentsLayout.addWidget( stylesButton, 3, 0 ) stylesButton.styleSelected.connect(self.agStyles.setCurrentStyle) tcbActions = pTreeComboBox( self ) tcbActions.setModel( self.mActionsModel ) self.dwWidgetsContentsLayout.addWidget( tcbActions, 4, 0 ) paypal = pPaypalButton( self ) paypal.setBusinessId( "5R924WYXJ6BAW" ) paypal.setItemName( "QWBFS Manager" ) paypal.setItemId( "QWBFS-DONATION" ) paypal.setCurrencyCode( "EUR" ) self.dwWidgetsContentsLayout.addWidget( paypal, 5, 0 ) toolButton1 = pToolButton( self.dwWidgetsContents ) toolButton1.setToolButtonStyle( Qt.ToolButtonTextBesideIcon ) toolButton1.setText( self.tr( "Bottom To Top" ) ) toolButton1.setIcon( pIconManager.icon( "pt.png") ) toolButton1.setDirection( QBoxLayout.BottomToTop ) self.dwWidgetsContentsLayout.addWidget( toolButton1, 0, 1, 6, 1 ) toolButton2 = pToolButton( self.dwWidgetsContents ) toolButton2.setToolButtonStyle( Qt.ToolButtonTextBesideIcon ) toolButton2.setText( self.tr( "Top To Bottom" ) ) toolButton2.setIcon( pIconManager.icon( "br.png" ) ) toolButton2.setDirection( QBoxLayout.TopToBottom ) self.dwWidgetsContentsLayout.addWidget( toolButton2, 0, 2, 6, 1 ) colorButton = pColorButton( self.dwWidgetsContents ) self.dwWidgetsContentsLayout.addWidget( colorButton, 6, 0 )
def createEnvironmentVariablesEditor(self): self.eveVariables = pEnvironmentVariablesEditor( self ) self.dwEnvironmentVariablesEditor = pDockWidget( self ) self.dwEnvironmentVariablesEditor.setObjectName( "EnvironmentVariablesEditor" ) self.dwEnvironmentVariablesEditor.setWidget( self.eveVariables ) self.dwEnvironmentVariablesEditor.toggleViewAction().setObjectName( "EnvironmentVariablesEditorViewAction" ) self.dockToolBar( Qt.TopToolBarArea ).addDockWidget( self.dwEnvironmentVariablesEditor, self.tr( "Environment Variables Editor" ), QIcon( pGuiUtils.scaledPixmap(":/fresh/country-flags/it.png", QSize( 96, 96 ) ) ) )
def createConsole(self): cShell = pConsole( "Shell:/> ", self ) self.commands = ConsoleCommands( self, self ) cShell.addAvailableCommand( self.commands ) self.dwShell = pDockWidget( self ) self.dwShell.setObjectName( "Shell" ) self.dwShell.setWidget( cShell ) self.dwShell.toggleViewAction().setObjectName( "ShellViewAction" ) self.dockToolBar( Qt.BottomToolBarArea ).addDockWidget( self.dwShell, self.tr( "Shell" ), QIcon(pGuiUtils.scaledPixmap( ":/fresh/country-flags/ro.png", QSize( 96, 96 ) ) ) )
def createListEditors(self): # list editor dock self.dwListEditor = pDockWidget( self ) twListEditors = QTabWidget( self.dwListEditor ) self.dwListEditor.setObjectName( "DockListEditor" ) self.dwListEditor.setWidget( twListEditors ) self.dwListEditor.toggleViewAction().setObjectName( "DockListEditorViewAction" ) self.dockToolBar( Qt.RightToolBarArea ).addDockWidget( self.dwListEditor, self.tr( "List Editor" ), QIcon(pGuiUtils.scaledPixmap( ":/fresh/country-flags/fr.png", QSize( 96, 96 )))) twListEditors.addTab( pStringListEditor( '', self ), self.tr( "Edit strings" ) ) twListEditors.addTab( pPathListEditor( '', ".", self ), self.tr( "Edit paths" ) ) twListEditors.addTab( pFileListEditor('', ".", "*.png", self ), self.tr( "Edit files" ))