From 2e0ac6cd88190ad88e76bbb93df3cdf975867346 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sun, 15 Jul 2012 08:13:53 +0000 Subject: [PATCH] 2012-07-15 00:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/idetools.prg * Minor. * contrib/hbide/hbide.hbp * contrib/hbide/ideactions.prg * contrib/hbide/idemain.prg * contrib/hbide/ideobject.prg + contrib/hbide/ideprojectwizard.prg + contrib/hbide/projectwizard.ui + Added: .ui and class to offer the facility to create a project with minimum of efforts. It is just the begining, only user interface is available currently, a work-in-progress. This can be accessed via
. Do have a look and let me know if more can be added... --- harbour/ChangeLog | 15 + harbour/contrib/hbide/hbide.hbp | 2 + harbour/contrib/hbide/ideactions.prg | 5 +- harbour/contrib/hbide/idemain.prg | 4 + harbour/contrib/hbide/ideobject.prg | 1 + harbour/contrib/hbide/ideprojectwizard.prg | 154 +++ harbour/contrib/hbide/idetools.prg | 2 +- harbour/contrib/hbide/projectwizard.ui | 1109 ++++++++++++++++++++ 8 files changed, 1289 insertions(+), 3 deletions(-) create mode 100644 harbour/contrib/hbide/ideprojectwizard.prg create mode 100644 harbour/contrib/hbide/projectwizard.ui diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f4a9bcc8e3..3880d4589b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,21 @@ The license applies to all entries newer than 2009-04-28. */ +2012-07-15 00:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/idetools.prg + * Minor. + * contrib/hbide/hbide.hbp + * contrib/hbide/ideactions.prg + * contrib/hbide/idemain.prg + * contrib/hbide/ideobject.prg + + contrib/hbide/ideprojectwizard.prg + + contrib/hbide/projectwizard.ui + + Added: .ui and class to offer the facility to create a project + with minimum of efforts. It is just the begining, only user + interface is available currently, a work-in-progress. This + can be accessed via
. + Do have a look and let me know if more can be added... + 2012-07-14 13:50 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/ideedit.prg * contrib/hbide/ideeditor.prg diff --git a/harbour/contrib/hbide/hbide.hbp b/harbour/contrib/hbide/hbide.hbp index a4b1ca28e4..4d0b68c5b1 100644 --- a/harbour/contrib/hbide/hbide.hbp +++ b/harbour/contrib/hbide/hbide.hbp @@ -59,6 +59,7 @@ idechangelog.prg ideconsole.prg ideparseexpr.c ideuisrcmanager.prg +ideprojectwizard.prg docviewgenerator.ui docwriter.ui @@ -89,6 +90,7 @@ tables.ui updown_v.ui format.ui changelog.ui +projectwizard.ui hbide.qrc diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index b8ab7e13e1..899b778aca 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -80,7 +80,7 @@ CLASS IdeActions INHERIT IdeObject DATA hActions INIT { => } DATA oActToolsBtn - + METHOD new( oIde ) METHOD create( oIde ) METHOD destroy() @@ -577,7 +577,8 @@ METHOD IdeActions:buildMainMenu() oSubMenu:addItem( { ::getAction( "SelectProject" ), {|| oIde:execAction( "SelectProject" ) } } ) oSubMenu:addItem( { ::getAction( "CloseProject" ), {|| oIde:execAction( "CloseProject" ) } } ) hbide_menuAddSep( oSubMenu ) - oSubMenu:addItem( { ::getAction( "Environments" ), {|| oIde:execAction( "Environments" ) } } ) +// oSubMenu:addItem( { ::getAction( "Environments" ), {|| oIde:execAction( "Environments" ) } } ) + oSubMenu:addItem( { "New Project Wizard" , {|| oIde:oPWZ:show() } } ) oMenuBar:addItem( { oSubMenu, NIL } ) /*----------------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/idemain.prg b/harbour/contrib/hbide/idemain.prg index 05ddb67203..63ef29e85b 100644 --- a/harbour/contrib/hbide/idemain.prg +++ b/harbour/contrib/hbide/idemain.prg @@ -171,6 +171,7 @@ CLASS HbIde DATA oCL /* ChangeLog Manager */ DATA oCUI /* CUI Screen Designer Console */ DATA oUiS /* UI Source Writer */ + DATA oPWZ /* Project Wizard */ DATA nRunMode INIT HBIDE_RUN_MODE_INI DATA nAnimantionMode INIT HBIDE_ANIMATION_NONE @@ -572,6 +573,9 @@ METHOD HbIde:create( aParams ) /* Initiate UI Source Manager */ ::oUiS := IdeUISrcManager():new( Self ):create() + /* Initiate Project Wizard */ + ::oPWZ := IdeProjectWizard():new( Self ):create() + /* Initialte Project Manager */ ::oPM := IdeProjManager():new( Self ):create() diff --git a/harbour/contrib/hbide/ideobject.prg b/harbour/contrib/hbide/ideobject.prg index 81150c8987..108c07ae63 100644 --- a/harbour/contrib/hbide/ideobject.prg +++ b/harbour/contrib/hbide/ideobject.prg @@ -104,6 +104,7 @@ CLASS IdeObject ACCESS oCL INLINE ::oIde:oCL ACCESS oCUI INLINE ::oIde:oCUI ACCESS oUiS INLINE ::oIde:oUiS + ACCESS oPWZ INLINE ::oIde:oPWZ ACCESS aMeta INLINE ::oIde:aMeta ACCESS aTags INLINE ::oIde:aTags diff --git a/harbour/contrib/hbide/ideprojectwizard.prg b/harbour/contrib/hbide/ideprojectwizard.prg new file mode 100644 index 0000000000..19aa36101f --- /dev/null +++ b/harbour/contrib/hbide/ideprojectwizard.prg @@ -0,0 +1,154 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * + * Copyright 2009-2012 Pritpal Bedi + * www - http://harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/* + * EkOnkar + * ( The LORD is ONE ) + * + * Harbour-Qt IDE + * + * Pritpal Bedi + * 14Jul2012 + */ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ + +#include "hbide.ch" +#include "hbqtgui.ch" +#include "common.ch" +#include "hbclass.ch" + +/*----------------------------------------------------------------------*/ +// +// Class IdeProjectWizard +// +/*----------------------------------------------------------------------*/ + +CREATE CLASS IdeProjectWizard INHERIT IdeObject + + METHOD new( oIde ) + METHOD create( oIde ) + METHOD destroy() + METHOD show() + METHOD execEvent( xEvent, p, p1 ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD IdeProjectWizard:new( oIde ) + + DEFAULT oIde TO ::oIde + ::oIde := oIde + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeProjectWizard:create( oIde ) + + DEFAULT oIde TO ::oIde + ::oIde := oIde + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeProjectWizard:destroy() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeProjectWizard:show() + + IF empty( ::oUI ) + ::oUI := ui_projectWizard():new() + ::oUI:oWidget:connect( QEvent_Close, {|| ::oUI:oWidget:done( 0 ) } ) + ::oUI:setWindowFlags( Qt_Sheet ) + ::oUI:setWindowIcon( QIcon( hbide_image( "hbide" ) ) ) + + ::oUI:btnNext:connect( "clicked()", {|| ::execEvent( "btnNext_clicked" ) } ) + ::oUI:btnBack:connect( "clicked()", {|| ::execEvent( "btnBack_clicked" ) } ) + ENDIF + + ::oUI:exec() + ::oUI:oWidget:hide() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeProjectWizard:execEvent( xEvent, p, p1 ) + + HB_SYMBOL_UNUSED( p ) + HB_SYMBOL_UNUSED( p1 ) + + SWITCH xEvent + CASE "btnNext_clicked" + IF ::oUI:stackedWidget:currentIndex() == 0 + ::oUI:stackedWidget:setcurrentIndex( 1 ) + ENDIF + EXIT + CASE "btnBack_clicked" + IF ::oUI:stackedWidget:currentIndex() == 1 + ::oUI:stackedWidget:setcurrentIndex( 0 ) + ENDIF + EXIT + ENDSWITCH + + RETURN NIL + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/idetools.prg b/harbour/contrib/hbide/idetools.prg index 5fac66cf2a..c46e5ee77f 100644 --- a/harbour/contrib/hbide/idetools.prg +++ b/harbour/contrib/hbide/idetools.prg @@ -172,7 +172,7 @@ METHOD IdeToolsManager:destroy() ::qToolsButton := NIL ::clearList() - ::qPanelsButton :disconnect( "clicked()" ) + ::qPanelsButton :disconnect( "clicked()" ) ::oUI:buttonAdd :disconnect( "clicked()" ) ::oUI:buttonDelete :disconnect( "clicked()" ) ::oUI:buttonUp :disconnect( "clicked()" ) diff --git a/harbour/contrib/hbide/projectwizard.ui b/harbour/contrib/hbide/projectwizard.ui new file mode 100644 index 0000000000..146ccc1aa3 --- /dev/null +++ b/harbour/contrib/hbide/projectwizard.ui @@ -0,0 +1,1109 @@ + + + Dialog + + + + 0 + 0 + 470 + 630 + + + + + 470 + 630 + + + + + 470 + 630 + + + + New Project Wizard + + + + + 0 + 0 + 469 + 581 + + + + 0 + + + + + + 8 + 244 + 453 + 113 + + + + QFrame::Panel + + + QFrame::Raised + + + + + 0 + 0 + 81 + 113 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 12 + 88 + 70 + 17 + + + + FWH + + + + + + 12 + 8 + 70 + 17 + + + + XHarbour + + + + + + 12 + 28 + 70 + 17 + + + + XBase++ + + + + + + 12 + 68 + 70 + 17 + + + + HbXbp + + + + + + 12 + 48 + 70 + 17 + + + + HbQt + + + + + + + 88 + 0 + 161 + 113 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 8 + 8 + 41 + 17 + + + + / a + + + + + + 8 + 28 + 41 + 17 + + + + / b + + + + + + 8 + 48 + 41 + 17 + + + + / es + + + + + + 8 + 68 + 41 + 17 + + + + / g + + + + + + 8 + 88 + 41 + 17 + + + + / l + + + + + + 48 + 48 + 29 + 17 + + + + + + + 84 + 8 + 41 + 17 + + + + / m + + + + + + 124 + 8 + 29 + 17 + + + + + + + 48 + 68 + 29 + 17 + + + + + + + 84 + 28 + 41 + 17 + + + + / n + + + + + + 84 + 48 + 41 + 17 + + + + / v + + + + + + 84 + 68 + 41 + 17 + + + + / w + + + + + + 84 + 88 + 41 + 17 + + + + / z + + + + + + 124 + 68 + 29 + 17 + + + + + + + + 252 + 0 + 65 + 113 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 8 + 8 + 41 + 17 + + + + inc + + + + + + 8 + 28 + 41 + 17 + + + + gui + + + + + + 8 + 48 + 49 + 17 + + + + info + + + + + + 8 + 68 + 53 + 17 + + + + shared + + + + + + 8 + 88 + 41 + 17 + + + + mt + + + + + + + 320 + 0 + 129 + 113 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 12 + 88 + 53 + 17 + + + + gtxwc + + + + + + 12 + 8 + 53 + 17 + + + + gtgui + + + + + + 12 + 48 + 53 + 17 + + + + gtwvt + + + + + + 12 + 28 + 53 + 17 + + + + gtwin + + + + + + 12 + 68 + 53 + 17 + + + + gtwvg + + + + + + 76 + 68 + 53 + 17 + + + + gtpca + + + + + + 76 + 28 + 53 + 17 + + + + gtstd + + + + + + 76 + 8 + 53 + 17 + + + + gttrm + + + + + + 76 + 48 + 53 + 17 + + + + gtsln + + + + + + 76 + 88 + 53 + 17 + + + + gtos2 + + + + + + + + 8 + 360 + 453 + 221 + + + + QFrame::Panel + + + QFrame::Raised + + + + + 8 + 8 + 437 + 205 + + + + + Courier New + + + + <html><head/><body><p>A free-slowing area where you can enter any other compiler switches, HbMk2 switches, or command-line swiches to be passed to hbMk2. Though it will be valid, but please do not add source files here which will be asked for on next page.</p></body></html> + + + QPlainTextEdit::NoWrap + + + + + + + 8 + 8 + 453 + 233 + + + + QFrame::Panel + + + QFrame::Raised + + + + + 12 + 12 + 46 + 13 + + + + Path + + + + + + 84 + 8 + 305 + 20 + + + + + + + 414 + 8 + 25 + 19 + + + + ... + + + + :/resources/open.png:/resources/open.png + + + true + + + + + + 12 + 40 + 41 + 16 + + + + Name + + + + + + 84 + 36 + 221 + 20 + + + + + + + 332 + 36 + 105 + 22 + + + + + + + 12 + 68 + 73 + 16 + + + + Output Name + + + + + + 84 + 64 + 221 + 20 + + + + + + + 12 + 96 + 65 + 16 + + + + Output Path + + + + + + 84 + 92 + 305 + 20 + + + + + + + 12 + 124 + 65 + 16 + + + + Working Path + + + + + + 84 + 120 + 305 + 20 + + + + + + + 412 + 92 + 25 + 19 + + + + ... + + + + :/resources/open.png:/resources/open.png + + + true + + + + + + 412 + 120 + 25 + 19 + + + + ... + + + + :/resources/open.png:/resources/open.png + + + true + + + + + + 12 + 152 + 65 + 16 + + + + Launch Exec + + + + + + 12 + 180 + 69 + 16 + + + + Launch Params + + + + + + 84 + 148 + 305 + 20 + + + + + + + 84 + 176 + 305 + 20 + + + + + + + 12 + 208 + 65 + 16 + + + + Stay In + + + + + + 84 + 204 + 305 + 20 + + + + + + + 412 + 204 + 25 + 19 + + + + ... + + + + :/resources/open.png:/resources/open.png + + + true + + + + + + + + + 12 + 11 + 449 + 33 + + + + QFrame::Panel + + + QFrame::Raised + + + + + 12 + 8 + 25 + 19 + + + + ... + + + + :/resources/open.png:/resources/open.png + + + true + + + + + + 92 + 8 + 25 + 19 + + + + ... + + + + :/resources/go-up.png:/resources/go-up.png + + + true + + + + + + 128 + 8 + 25 + 19 + + + + ... + + + + :/resources/go-down.png:/resources/go-down.png + + + true + + + + + + 204 + 8 + 25 + 19 + + + + ... + + + + :/resources/dc_delete.png:/resources/dc_delete.png + + + true + + + + + + + 12 + 48 + 449 + 533 + + + + QFrame::Panel + + + QFrame::Raised + + + + + 8 + 8 + 321 + 517 + + + + + Courier New + + + + QPlainTextEdit::NoWrap + + + + + false + + + + 336 + 8 + 104 + 517 + + + + + Courier New + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + + + + + + + 8 + 588 + 453 + 37 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 284 + 8 + 75 + 23 + + + + Save + + + + + + 372 + 8 + 75 + 23 + + + + Cancel + + + + + + 96 + 8 + 75 + 23 + + + + Next + + + + + + 8 + 8 + 75 + 23 + + + + Back + + + + + + + + +