diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 973bfed008..1fc1646712 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,25 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-06-07 07:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + + contrib/hbide/resources/setup.ui + + contrib/hbide/resources/setup.uic + + New dialog to hold setup and ini information - in the making. + + * contrib/hbide/hbide.prg + ! "Output Console" made hidded even if at previous run it was visible. + + * contrib/hbide/ideactions.prg + + New menu option to invoke Setup dialog. + + * contrib/hbide/ideobject.prg + * contrib/hbide/ideprojmanager.prg + ! Fixed error reported by few which appears randomely + and I could not reproduce. + + * contrib/hbide/idesaveload.prg + + Added class IdeSetup() - in the making. + 2010-06-07 13:22 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/gtgui/gtgui.c * src/rtl/gtwin/gtwin.c diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index 2249112144..a057133a8c 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -143,6 +143,7 @@ CLASS HbIde DATA oSC /* Shortcuts Manager */ DATA oTM /* Plugin Tools Manager */ DATA oTH /* Themes Manager */ + DATA oSetup /* Setup Manager */ DATA nRunMode INIT HBIDE_RUN_MODE_INI DATA nAnimantionMode INIT HBIDE_ANIMATION_NONE @@ -452,6 +453,9 @@ METHOD HbIde:create( aParams ) /* Home Implementation */ ::oHM := IdeHome():new():create( Self ) + /* Setup Manager */ + ::oSetup := IdeSetup():new( Self ):create() + /* Fill various elements of the IDE */ ::cWrkProject := ::aINI[ INI_HBIDE, CurrentProject ] ::oPM:populate() @@ -487,6 +491,8 @@ METHOD HbIde:create( aParams ) ENDDO #endif + ::oDockB2:hide() /* This widget never contains anything so must be forced to hide */ + /* Request Main Window to Appear on the Screen */ ::oHM:refresh() ::oDlg:Show() @@ -661,6 +667,9 @@ METHOD HbIde:execAction( cKey ) ::nAnimantionMode := iif( ::nAnimantionMode == HBIDE_ANIMATION_NONE, HBIDE_ANIMATION_GRADIENT, HBIDE_ANIMATION_NONE ) ::oDK:animateComponents( ::nAnimantionMode ) EXIT + CASE "Setup" + ::oSetup:show() + EXIT CASE "Shortcuts" ::oSC:show() EXIT diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index 8e2585af86..b14e9aa63b 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -309,6 +309,7 @@ METHOD IdeActions:loadActions() aadd( aAct, { "GotoFunc" , "Goto Function" , "dc_function" , "" , "No", "Yes" } ) aadd( aAct, { "Shortcuts" , "Keyboard Mappings" , "keyboardmappings","" , "No", "Yes" } ) + aadd( aAct, { "Setup" , "hbIDE Setup" , "" , "" , "No", "Yes" } ) * aadd( aAct, { "Tools" , "Tools & Utilities" , "tools" , "" , "No", "Yes" } ) RETURN aAct @@ -596,6 +597,8 @@ METHOD IdeActions:buildMainMenu() /*----------------------------------------------------------------------------*/ oSubMenu := XbpMenu():new( oMenuBar ):create() oSubMenu:title := "~Setup" + oSubMenu:addItem( { ::getAction( "Setup" ), {|| oIde:execAction( "Setup" ) } } ) + hbide_menuAddSep( oSubMenu ) oSubMenu:addItem( { ::getAction( "Shortcuts" ), {|| oIde:execAction( "Shortcuts" ) } } ) hbide_menuAddSep( oSubMenu ) oSubMenu:addItem( { ::getAction( "TB_Tools" ), {|| oIde:execAction( "Tools" ) } } ) diff --git a/harbour/contrib/hbide/ideobject.prg b/harbour/contrib/hbide/ideobject.prg index b9598d0849..4cb494dc58 100644 --- a/harbour/contrib/hbide/ideobject.prg +++ b/harbour/contrib/hbide/ideobject.prg @@ -99,6 +99,7 @@ CLASS IdeObject ACCESS oTM INLINE ::oIde:oTM ACCESS oTH INLINE ::oIde:oTH ACCESS oFF INLINE ::oIde:oFF + ACCESS oSetup INLINE ::oIde:oSetup ACCESS aMeta INLINE ::oIde:aMeta ACCESS aTags INLINE ::oIde:aTags diff --git a/harbour/contrib/hbide/ideprojmanager.prg b/harbour/contrib/hbide/ideprojmanager.prg index a83b0aee97..a1dc68edb4 100644 --- a/harbour/contrib/hbide/ideprojmanager.prg +++ b/harbour/contrib/hbide/ideprojmanager.prg @@ -1474,7 +1474,7 @@ METHOD IdeProjManager:finished( nExitCode, nExitStatus, oProcess ) ENDIF ENDIF - IF empty( ::cProjectInProcess ) + IF hb_isObject( ::cargo ) cExe := hbide_PathProc( cExe, hbide_pathToOSPath( ::cargo:cPath ) ) ELSE cExe := hbide_PathProc( cExe, hbide_pathToOSPath( ::oProject:location ) ) diff --git a/harbour/contrib/hbide/idesaveload.prg b/harbour/contrib/hbide/idesaveload.prg index db205255b3..fa6799873c 100644 --- a/harbour/contrib/hbide/idesaveload.prg +++ b/harbour/contrib/hbide/idesaveload.prg @@ -66,6 +66,7 @@ #include "hbide.ch" #include "common.ch" +#include "hbclass.ch" #include "hbqt.ch" /*----------------------------------------------------------------------*/ @@ -559,3 +560,76 @@ FUNCTION hbide_saveShortcuts( oIde, a_, cFileShortcuts ) RETURN hb_fileExists( cFileShortcuts ) /*----------------------------------------------------------------------*/ +// Class IdeSetup +/*----------------------------------------------------------------------*/ + +CLASS IdeSetup INHERIT IdeObject + + METHOD new( oIde ) + METHOD create( oIde ) + METHOD destroy() + METHOD show() + METHOD execEvent( cEvent, p ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD IdeSetup:new( oIde ) + ::oIde := oIde + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeSetup:create( oIde ) + DEFAULT oIde TO ::oIde + + ::oIde := oIde + + IF .t. + ::oUI := HbQtUI():new( hbide_uic( "setup" ), ::oDlg:oWidget ):build() + + ::oUI:setMaximumWidth( ::oUI:width() ) + ::oUI:setMinimumWidth( ::oUI:width() ) + ::oUI:setMaximumHeight( ::oUI:height() ) + ::oUI:setMinimumHeight( ::oUI:height() ) + + ::connect( ::oUI:q_buttonClose, "clicked()", {|| ::execEvent( "buttonClose_clicked" ) } ) + + ::oUI:hide() + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeSetup:destroy() + IF !empty( ::oUI ) + ::oUI:destroy() + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeSetup:show() + + ::oUI:exec() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeSetup:execEvent( cEvent, p ) + HB_SYMBOL_UNUSED( p ) + + SWITCH cEvent + CASE "buttonClose_clicked" + ::oUI:done( 1 ) + EXIT + ENDSWITCH + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/resources/setup.ui b/harbour/contrib/hbide/resources/setup.ui new file mode 100644 index 0000000000..8491ad8080 --- /dev/null +++ b/harbour/contrib/hbide/resources/setup.ui @@ -0,0 +1,177 @@ + + + DialogSetup + + + + 0 + 0 + 476 + 413 + + + + Setup + + + + + 6 + 8 + 119 + 397 + + + + false + + + false + + + + 1 + + + + + + + 136 + 10 + 331 + 357 + + + + 0 + + + + + + 2 + -2 + 46 + 14 + + + + Page 1 + + + + + + + + 2 + -2 + 46 + 14 + + + + Page 2 + + + + + + + + 0 + -2 + 46 + 14 + + + + Page 3 + + + + + + + + 0 + -2 + 46 + 14 + + + + Page 4 + + + + + + + + 2 + 16 + 327 + 341 + + + + + + + 4 + -4 + 121 + 16 + + + + Variables: + + + + + + + + 138 + 384 + 75 + 24 + + + + Close + + + + + + 268 + 384 + 75 + 24 + + + + Cancel + + + + + + 392 + 384 + 75 + 24 + + + + Ok + + + + + + diff --git a/harbour/contrib/hbide/resources/setup.uic b/harbour/contrib/hbide/resources/setup.uic new file mode 100644 index 0000000000..b379d856bc --- /dev/null +++ b/harbour/contrib/hbide/resources/setup.uic @@ -0,0 +1,135 @@ +/******************************************************************************** +** Form generated from reading UI file 'setup.ui' +** +** Created: Sun Jun 6 22:38:08 2010 +** by: Qt User Interface Compiler version 4.6.2 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef SETUP_H +#define SETUP_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_DialogSetup +{ +public: + QTreeWidget *treeWidget; + QStackedWidget *stackedWidget; + QWidget *page; + QLabel *label_2; + QWidget *page_2; + QLabel *label_3; + QWidget *page_3; + QLabel *label_4; + QWidget *page_4; + QLabel *label_5; + QWidget *page_5; + QTableWidget *tableWidget; + QLabel *label; + QPushButton *buttonClose; + QPushButton *buttonCancel; + QPushButton *buttonOk; + + void setupUi(QDialog *DialogSetup) + { + if (DialogSetup->objectName().isEmpty()) + DialogSetup->setObjectName(QString::fromUtf8("DialogSetup")); + DialogSetup->resize(476, 413); + treeWidget = new QTreeWidget(DialogSetup); + QTreeWidgetItem *__qtreewidgetitem = new QTreeWidgetItem(); + __qtreewidgetitem->setText(0, QString::fromUtf8("1")); + treeWidget->setHeaderItem(__qtreewidgetitem); + treeWidget->setObjectName(QString::fromUtf8("treeWidget")); + treeWidget->setGeometry(QRect(6, 8, 119, 397)); + treeWidget->header()->setVisible(false); + stackedWidget = new QStackedWidget(DialogSetup); + stackedWidget->setObjectName(QString::fromUtf8("stackedWidget")); + stackedWidget->setGeometry(QRect(136, 10, 331, 357)); + page = new QWidget(); + page->setObjectName(QString::fromUtf8("page")); + label_2 = new QLabel(page); + label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setGeometry(QRect(2, -2, 46, 14)); + stackedWidget->addWidget(page); + page_2 = new QWidget(); + page_2->setObjectName(QString::fromUtf8("page_2")); + label_3 = new QLabel(page_2); + label_3->setObjectName(QString::fromUtf8("label_3")); + label_3->setGeometry(QRect(2, -2, 46, 14)); + stackedWidget->addWidget(page_2); + page_3 = new QWidget(); + page_3->setObjectName(QString::fromUtf8("page_3")); + label_4 = new QLabel(page_3); + label_4->setObjectName(QString::fromUtf8("label_4")); + label_4->setGeometry(QRect(0, -2, 46, 14)); + stackedWidget->addWidget(page_3); + page_4 = new QWidget(); + page_4->setObjectName(QString::fromUtf8("page_4")); + label_5 = new QLabel(page_4); + label_5->setObjectName(QString::fromUtf8("label_5")); + label_5->setGeometry(QRect(0, -2, 46, 14)); + stackedWidget->addWidget(page_4); + page_5 = new QWidget(); + page_5->setObjectName(QString::fromUtf8("page_5")); + tableWidget = new QTableWidget(page_5); + tableWidget->setObjectName(QString::fromUtf8("tableWidget")); + tableWidget->setGeometry(QRect(2, 16, 327, 341)); + label = new QLabel(page_5); + label->setObjectName(QString::fromUtf8("label")); + label->setGeometry(QRect(4, -4, 121, 16)); + stackedWidget->addWidget(page_5); + buttonClose = new QPushButton(DialogSetup); + buttonClose->setObjectName(QString::fromUtf8("buttonClose")); + buttonClose->setGeometry(QRect(138, 384, 75, 24)); + buttonCancel = new QPushButton(DialogSetup); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonCancel->setGeometry(QRect(268, 384, 75, 24)); + buttonOk = new QPushButton(DialogSetup); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + buttonOk->setGeometry(QRect(392, 384, 75, 24)); + + retranslateUi(DialogSetup); + + stackedWidget->setCurrentIndex(0); + + + QMetaObject::connectSlotsByName(DialogSetup); + } // setupUi + + void retranslateUi(QDialog *DialogSetup) + { + DialogSetup->setWindowTitle(QApplication::translate("DialogSetup", "Setup", 0, QApplication::UnicodeUTF8)); + label_2->setText(QApplication::translate("DialogSetup", "Page 1", 0, QApplication::UnicodeUTF8)); + label_3->setText(QApplication::translate("DialogSetup", "Page 2", 0, QApplication::UnicodeUTF8)); + label_4->setText(QApplication::translate("DialogSetup", "Page 3", 0, QApplication::UnicodeUTF8)); + label_5->setText(QApplication::translate("DialogSetup", "Page 4", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("DialogSetup", "Variables:", 0, QApplication::UnicodeUTF8)); + buttonClose->setText(QApplication::translate("DialogSetup", "Close", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("DialogSetup", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("DialogSetup", "Ok", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class DialogSetup: public Ui_DialogSetup {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // SETUP_H