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 <Setup><hbIDE Setup> 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.
This commit is contained in:
Pritpal Bedi
2010-06-07 14:56:23 +00:00
parent 310cf196a2
commit 15ade39255
8 changed files with 419 additions and 1 deletions

View File

@@ -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 <Setup><hbIDE Setup> 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

View File

@@ -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

View File

@@ -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" ) } } )

View File

@@ -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

View File

@@ -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 ) )

View File

@@ -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
/*----------------------------------------------------------------------*/

View File

@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DialogSetup</class>
<widget class="QDialog" name="DialogSetup">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>476</width>
<height>413</height>
</rect>
</property>
<property name="windowTitle">
<string>Setup</string>
</property>
<widget class="QTreeWidget" name="treeWidget">
<property name="geometry">
<rect>
<x>6</x>
<y>8</y>
<width>119</width>
<height>397</height>
</rect>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
<widget class="QStackedWidget" name="stackedWidget">
<property name="geometry">
<rect>
<x>136</x>
<y>10</y>
<width>331</width>
<height>357</height>
</rect>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page">
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>2</x>
<y>-2</y>
<width>46</width>
<height>14</height>
</rect>
</property>
<property name="text">
<string>Page 1</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="page_2">
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>2</x>
<y>-2</y>
<width>46</width>
<height>14</height>
</rect>
</property>
<property name="text">
<string>Page 2</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="page_3">
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>0</x>
<y>-2</y>
<width>46</width>
<height>14</height>
</rect>
</property>
<property name="text">
<string>Page 3</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="page_4">
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>0</x>
<y>-2</y>
<width>46</width>
<height>14</height>
</rect>
</property>
<property name="text">
<string>Page 4</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="page_5">
<widget class="QTableWidget" name="tableWidget">
<property name="geometry">
<rect>
<x>2</x>
<y>16</y>
<width>327</width>
<height>341</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>4</x>
<y>-4</y>
<width>121</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Variables:</string>
</property>
</widget>
</widget>
</widget>
<widget class="QPushButton" name="buttonClose">
<property name="geometry">
<rect>
<x>138</x>
<y>384</y>
<width>75</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>Close</string>
</property>
</widget>
<widget class="QPushButton" name="buttonCancel">
<property name="geometry">
<rect>
<x>268</x>
<y>384</y>
<width>75</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
<widget class="QPushButton" name="buttonOk">
<property name="geometry">
<rect>
<x>392</x>
<y>384</y>
<width>75</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>Ok</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -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 <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QDialog>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QStackedWidget>
#include <QtGui/QTableWidget>
#include <QtGui/QTreeWidget>
#include <QtGui/QWidget>
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