/****************************************************************************
** Form implementation generated from reading ui file 'toglobalsettingui.ui'
**
** Created: Tue Sep 18 08:21:28 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "toglobalsettingui.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qspinbox.h>
#include <qcombobox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a toGlobalSettingUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
toGlobalSettingUI::toGlobalSettingUI( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "toGlobalSettingUI" );
    toGlobalSettingUILayout = new QGridLayout( this, 1, 1, 11, 6, "toGlobalSettingUILayout"); 

    GroupBox2 = new QGroupBox( this, "GroupBox2" );
    GroupBox2->setColumnLayout(0, Qt::Vertical );
    GroupBox2->layout()->setSpacing( 6 );
    GroupBox2->layout()->setMargin( 11 );
    GroupBox2Layout = new QGridLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( Qt::AlignTop );

    TextLabel5 = new QLabel( GroupBox2, "TextLabel5" );

    GroupBox2Layout->addWidget( TextLabel5, 0, 0 );

    SQLBrowse = new QPushButton( GroupBox2, "SQLBrowse" );

    GroupBox2Layout->addWidget( SQLBrowse, 0, 2 );

    CustomSQL = new QLineEdit( GroupBox2, "CustomSQL" );
    CustomSQL->setFrameShape( QLineEdit::LineEditPanel );
    CustomSQL->setFrameShadow( QLineEdit::Sunken );

    GroupBox2Layout->addWidget( CustomSQL, 0, 1 );

    PluginBrowse = new QPushButton( GroupBox2, "PluginBrowse" );

    GroupBox2Layout->addWidget( PluginBrowse, 3, 2 );

    PluginDirectory = new QLineEdit( GroupBox2, "PluginDirectory" );

    GroupBox2Layout->addWidget( PluginDirectory, 3, 1 );

    PluginLabel = new QLabel( GroupBox2, "PluginLabel" );

    GroupBox2Layout->addWidget( PluginLabel, 3, 0 );

    CacheBrowse = new QPushButton( GroupBox2, "CacheBrowse" );

    GroupBox2Layout->addWidget( CacheBrowse, 4, 2 );

    CacheDirectory = new QLineEdit( GroupBox2, "CacheDirectory" );

    GroupBox2Layout->addWidget( CacheDirectory, 4, 1 );

    CacheLabel = new QLabel( GroupBox2, "CacheLabel" );

    GroupBox2Layout->addWidget( CacheLabel, 4, 0 );

    PluginLabel_2 = new QLabel( GroupBox2, "PluginLabel_2" );

    GroupBox2Layout->addWidget( PluginLabel_2, 1, 0 );

    HelpDirectory = new QLineEdit( GroupBox2, "HelpDirectory" );

    GroupBox2Layout->addWidget( HelpDirectory, 1, 1 );

    HelpBrowse = new QPushButton( GroupBox2, "HelpBrowse" );

    GroupBox2Layout->addWidget( HelpBrowse, 1, 2 );

    PluginLabel_2_2 = new QLabel( GroupBox2, "PluginLabel_2_2" );

    GroupBox2Layout->addWidget( PluginLabel_2_2, 2, 0 );

    DefaultSession = new QLineEdit( GroupBox2, "DefaultSession" );

    GroupBox2Layout->addWidget( DefaultSession, 2, 1 );

    HelpBrowse_2 = new QPushButton( GroupBox2, "HelpBrowse_2" );

    GroupBox2Layout->addWidget( HelpBrowse_2, 2, 2 );

    toGlobalSettingUILayout->addWidget( GroupBox2, 0, 0 );

    OptionGroup = new QGroupBox( this, "OptionGroup" );
    OptionGroup->setColumnLayout(0, Qt::Vertical );
    OptionGroup->layout()->setSpacing( 6 );
    OptionGroup->layout()->setMargin( 11 );
    OptionGroupLayout = new QGridLayout( OptionGroup->layout() );
    OptionGroupLayout->setAlignment( Qt::AlignTop );

    SavePassword = new QCheckBox( OptionGroup, "SavePassword" );

    OptionGroupLayout->addWidget( SavePassword, 1, 0 );

    IncludeDB = new QCheckBox( OptionGroup, "IncludeDB" );

    OptionGroupLayout->addWidget( IncludeDB, 2, 0 );

    ChangeConnection = new QCheckBox( OptionGroup, "ChangeConnection" );

    OptionGroupLayout->addMultiCellWidget( ChangeConnection, 0, 0, 0, 2 );

    TextLabel3_2_2 = new QLabel( OptionGroup, "TextLabel3_2_2" );

    OptionGroupLayout->addWidget( TextLabel3_2_2, 0, 3 );

    ConnectHistory = new QSpinBox( OptionGroup, "ConnectHistory" );
    ConnectHistory->setMaxValue( 1000 );

    OptionGroupLayout->addMultiCellWidget( ConnectHistory, 0, 0, 4, 5 );

    HistorySize = new QSpinBox( OptionGroup, "HistorySize" );
    HistorySize->setMaxValue( 1000 );

    OptionGroupLayout->addMultiCellWidget( HistorySize, 2, 2, 4, 5 );

    TextLabel3_2 = new QLabel( OptionGroup, "TextLabel3_2" );

    OptionGroupLayout->addWidget( TextLabel3_2, 2, 3 );

    Status = new QSpinBox( OptionGroup, "Status" );

    OptionGroupLayout->addMultiCellWidget( Status, 1, 1, 4, 5 );

    StatusLabel = new QLabel( OptionGroup, "StatusLabel" );

    OptionGroupLayout->addWidget( StatusLabel, 1, 3 );

    Statusbar = new QCheckBox( OptionGroup, "Statusbar" );

    OptionGroupLayout->addMultiCellWidget( Statusbar, 1, 1, 1, 2 );

    ToolsLeft = new QCheckBox( OptionGroup, "ToolsLeft" );

    OptionGroupLayout->addMultiCellWidget( ToolsLeft, 3, 3, 1, 2 );

    MaximizeMain = new QCheckBox( OptionGroup, "MaximizeMain" );

    OptionGroupLayout->addMultiCellWidget( MaximizeMain, 2, 2, 1, 2 );

    RestoreSession = new QCheckBox( OptionGroup, "RestoreSession" );

    OptionGroupLayout->addWidget( RestoreSession, 3, 0 );

    DesktopAware = new QCheckBox( OptionGroup, "DesktopAware" );

    OptionGroupLayout->addWidget( DesktopAware, 4, 0 );

    AntialiaseFonts = new QCheckBox( OptionGroup, "AntialiaseFonts" );

    OptionGroupLayout->addWidget( AntialiaseFonts, 5, 0 );

    DockToolbar = new QCheckBox( OptionGroup, "DockToolbar" );

    OptionGroupLayout->addWidget( DockToolbar, 6, 0 );

    StyleLabel = new QLabel( OptionGroup, "StyleLabel" );

    OptionGroupLayout->addWidget( StyleLabel, 8, 3 );

    SizeLabel = new QLabel( OptionGroup, "SizeLabel" );

    OptionGroupLayout->addWidget( SizeLabel, 5, 3 );

    Refresh = new QComboBox( FALSE, OptionGroup, "Refresh" );

    OptionGroupLayout->addMultiCellWidget( Refresh, 6, 6, 4, 5 );

    SizeUnit = new QComboBox( FALSE, OptionGroup, "SizeUnit" );

    OptionGroupLayout->addMultiCellWidget( SizeUnit, 5, 5, 4, 5 );

    DefaultFormat = new QComboBox( FALSE, OptionGroup, "DefaultFormat" );

    OptionGroupLayout->addMultiCellWidget( DefaultFormat, 7, 7, 4, 5 );

    TextLabel2 = new QLabel( OptionGroup, "TextLabel2" );

    OptionGroupLayout->addWidget( TextLabel2, 7, 3 );

    RefreshLabel = new QLabel( OptionGroup, "RefreshLabel" );

    OptionGroupLayout->addWidget( RefreshLabel, 6, 3 );

    Style = new QComboBox( FALSE, OptionGroup, "Style" );

    OptionGroupLayout->addMultiCellWidget( Style, 8, 8, 4, 5 );

    TextLabel3_2_3 = new QLabel( OptionGroup, "TextLabel3_2_3" );

    OptionGroupLayout->addWidget( TextLabel3_2_3, 3, 3 );

    ChartSamples = new QSpinBox( OptionGroup, "ChartSamples" );
    ChartSamples->setMaxValue( 1000 );

    OptionGroupLayout->addWidget( ChartSamples, 3, 4 );

    UnlimitedSamples = new QCheckBox( OptionGroup, "UnlimitedSamples" );

    OptionGroupLayout->addWidget( UnlimitedSamples, 3, 5 );

    TextLabel3_2_3_2 = new QLabel( OptionGroup, "TextLabel3_2_3_2" );

    OptionGroupLayout->addWidget( TextLabel3_2_3_2, 4, 3 );

    DisplaySamples = new QSpinBox( OptionGroup, "DisplaySamples" );
    DisplaySamples->setMaxValue( 1000 );

    OptionGroupLayout->addWidget( DisplaySamples, 4, 4 );

    AllSamples = new QCheckBox( OptionGroup, "AllSamples" );

    OptionGroupLayout->addWidget( AllSamples, 4, 5 );

    DiskCaching = new QCheckBox( OptionGroup, "DiskCaching" );

    OptionGroupLayout->addMultiCellWidget( DiskCaching, 4, 4, 1, 2 );

    LocaleLabel = new QLabel( OptionGroup, "LocaleLabel" );
    LocaleLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, 0, 0, LocaleLabel->sizePolicy().hasHeightForWidth() ) );

    OptionGroupLayout->addWidget( LocaleLabel, 8, 1 );

    Locale = new QLineEdit( OptionGroup, "Locale" );
    Locale->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, 0, 0, Locale->sizePolicy().hasHeightForWidth() ) );

    OptionGroupLayout->addWidget( Locale, 8, 2 );

    DisplayGrid = new QCheckBox( OptionGroup, "DisplayGrid" );

    OptionGroupLayout->addMultiCellWidget( DisplayGrid, 6, 6, 1, 2 );

    ToadBindings = new QCheckBox( OptionGroup, "ToadBindings" );

    OptionGroupLayout->addMultiCellWidget( ToadBindings, 7, 7, 1, 2 );

    toGlobalSettingUILayout->addWidget( OptionGroup, 1, 0 );
    languageChange();
    resize( QSize(625, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( PluginBrowse, SIGNAL( clicked() ), this, SLOT( pluginBrowse() ) );
    connect( SQLBrowse, SIGNAL( clicked() ), this, SLOT( pluginBrowse() ) );
    connect( SQLBrowse, SIGNAL( clicked() ), this, SLOT( sqlBrowse() ) );
    connect( HelpBrowse, SIGNAL( clicked() ), this, SLOT( helpBrowse() ) );
    connect( HelpBrowse_2, SIGNAL( clicked() ), this, SLOT( sessionBrowse() ) );
    connect( UnlimitedSamples, SIGNAL( toggled(bool) ), ChartSamples, SLOT( setDisabled(bool) ) );
    connect( AllSamples, SIGNAL( toggled(bool) ), DisplaySamples, SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( CustomSQL, SQLBrowse );
    setTabOrder( SQLBrowse, HelpDirectory );
    setTabOrder( HelpDirectory, HelpBrowse );
    setTabOrder( HelpBrowse, DefaultSession );
    setTabOrder( DefaultSession, HelpBrowse_2 );
    setTabOrder( HelpBrowse_2, PluginDirectory );
    setTabOrder( PluginDirectory, PluginBrowse );
    setTabOrder( PluginBrowse, ChangeConnection );
    setTabOrder( ChangeConnection, SavePassword );
    setTabOrder( SavePassword, IncludeDB );
    setTabOrder( IncludeDB, RestoreSession );
    setTabOrder( RestoreSession, DesktopAware );
    setTabOrder( DesktopAware, AntialiaseFonts );
    setTabOrder( AntialiaseFonts, DockToolbar );
    setTabOrder( DockToolbar, Statusbar );
    setTabOrder( Statusbar, MaximizeMain );
    setTabOrder( MaximizeMain, ToolsLeft );
    setTabOrder( ToolsLeft, Locale );
    setTabOrder( Locale, ConnectHistory );
    setTabOrder( ConnectHistory, Status );
    setTabOrder( Status, HistorySize );
    setTabOrder( HistorySize, ChartSamples );
    setTabOrder( ChartSamples, UnlimitedSamples );
    setTabOrder( UnlimitedSamples, DisplaySamples );
    setTabOrder( DisplaySamples, AllSamples );
    setTabOrder( AllSamples, SizeUnit );
    setTabOrder( SizeUnit, Refresh );
    setTabOrder( Refresh, DefaultFormat );
    setTabOrder( DefaultFormat, Style );

    // buddies
    TextLabel5->setBuddy( CustomSQL );
    PluginLabel->setBuddy( PluginDirectory );
    CacheLabel->setBuddy( CacheDirectory );
    PluginLabel_2->setBuddy( HelpDirectory );
    PluginLabel_2_2->setBuddy( DefaultSession );
    TextLabel3_2_2->setBuddy( ConnectHistory );
    TextLabel3_2->setBuddy( HistorySize );
    StatusLabel->setBuddy( Status );
    StyleLabel->setBuddy( Style );
    RefreshLabel->setBuddy( Refresh );
    TextLabel3_2_3->setBuddy( HistorySize );
    TextLabel3_2_3_2->setBuddy( HistorySize );
}

/*
 *  Destroys the object and frees any allocated resources
 */
toGlobalSettingUI::~toGlobalSettingUI()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toGlobalSettingUI::languageChange()
{
    setCaption( tr( "toGlobalSettingUI" ) );
    GroupBox2->setTitle( tr( "Paths" ) );
    TextLabel5->setText( tr( "&Custom SQL" ) );
    SQLBrowse->setText( tr( "Browse" ) );
    PluginBrowse->setText( tr( "Browse" ) );
    PluginLabel->setText( tr( "&Plugin directory" ) );
    QToolTip::add( PluginLabel, tr( "Directory where to find plugins when starting." ) );
    CacheBrowse->setText( tr( "Browse" ) );
    CacheLabel->setText( tr( "&Cache directory" ) );
    QToolTip::add( CacheLabel, tr( "Directory where to place cached dataaseinformation." ) );
    PluginLabel_2->setText( tr( "&Help directory" ) );
    QToolTip::add( PluginLabel_2, tr( "Directory where to find help files." ) );
    HelpBrowse->setText( tr( "Browse" ) );
    PluginLabel_2_2->setText( tr( "Default session" ) );
    QToolTip::add( PluginLabel_2_2, tr( "Default session to use when saving a session." ) );
    HelpBrowse_2->setText( tr( "Browse" ) );
    OptionGroup->setTitle( tr( "Options" ) );
    SavePassword->setText( tr( "&Save passwords" ) );
    SavePassword->setAccel( QKeySequence( tr( "Alt+S" ) ) );
    QToolTip::add( SavePassword, tr( "Remember the last password you used to connect.\n"
"Will leave the password unencryptet in the config file." ) );
    IncludeDB->setText( tr( "Include DB in caption" ) );
    QToolTip::add( IncludeDB, tr( "Include database connection in window captions" ) );
    ChangeConnection->setText( tr( "Change current connection with active window" ) );
    QToolTip::add( ChangeConnection, tr( "Change currently select connection to the connection of the new active window" ) );
    TextLabel3_2_2->setText( tr( "Connect history" ) );
    QToolTip::add( TextLabel3_2_2, tr( "Number of connections to save in history." ) );
    ConnectHistory->setSuffix( QString::null );
    HistorySize->setSuffix( QString::null );
    TextLabel3_2->setText( tr( "Message history" ) );
    QToolTip::add( TextLabel3_2, tr( "Number of status messages to save in the message history." ) );
    Status->setSuffix( tr( " seconds" ) );
    StatusLabel->setText( tr( "Status &message" ) );
    QToolTip::add( StatusLabel, tr( "The time in seconds temporary messages will be displayed in the status bar. 0 menas keep." ) );
    Statusbar->setText( tr( "Display alerts in statusbar only" ) );
    QToolTip::add( Statusbar, tr( "Display alerts in messagebar instead of poping up a dialog with a warning." ) );
    ToolsLeft->setText( tr( "Tools toolbar on left" ) );
    QToolTip::add( ToolsLeft, tr( "Start using the tools toolbar on the left of the main window instead of at the top." ) );
    MaximizeMain->setText( tr( "Maximize window on start" ) );
    RestoreSession->setText( tr( "Restore session on startup" ) );
    DesktopAware->setText( tr( "&Desktop aware" ) );
    QToolTip::add( DesktopAware, tr( "Colors get really weird in KDE if you select this." ) );
    AntialiaseFonts->setText( tr( "&Antialiase fonts" ) );
    QToolTip::add( AntialiaseFonts, tr( "Use antialiase fonts if Qt supports this. You need to restart for this to take affect." ) );
    DockToolbar->setText( tr( "Docks use toolbars" ) );
    QToolTip::add( DockToolbar, tr( "Check this if docks are to use toolbars instead of normal frames." ) );
    StyleLabel->setText( tr( "&Style" ) );
    QToolTip::add( StyleLabel, tr( "The style to use for the user interface." ) );
    SizeLabel->setText( tr( "Size Unit" ) );
    QToolTip::add( SizeLabel, tr( "Define the unit sizes should be displayed." ) );
    SizeUnit->clear();
    SizeUnit->insertItem( tr( "Bytes" ) );
    SizeUnit->insertItem( tr( "KB" ) );
    SizeUnit->insertItem( tr( "MB" ) );
    DefaultFormat->clear();
    DefaultFormat->insertItem( tr( "Text" ) );
    DefaultFormat->insertItem( tr( "Tab delimited" ) );
    DefaultFormat->insertItem( tr( "CSV" ) );
    DefaultFormat->insertItem( tr( "HTML" ) );
    TextLabel2->setText( tr( "Default list format" ) );
    RefreshLabel->setText( tr( "&Refresh" ) );
    QToolTip::add( RefreshLabel, tr( "Default refreshtime in tools." ) );
    TextLabel3_2_3->setText( tr( "Chart samples" ) );
    QToolTip::add( TextLabel3_2_3, tr( "Number of samples to keep in line and barcharts by default." ) );
    ChartSamples->setSuffix( QString::null );
    UnlimitedSamples->setText( tr( "Unlimited" ) );
    QToolTip::add( UnlimitedSamples, tr( "Save unlimited number of samples. Can large amounts of consume memory." ) );
    TextLabel3_2_3_2->setText( tr( "Display samples" ) );
    QToolTip::add( TextLabel3_2_3_2, tr( "Number of samples to display in line and barcharts by default." ) );
    DisplaySamples->setSuffix( QString::null );
    AllSamples->setText( tr( "All" ) );
    QToolTip::add( AllSamples, tr( "Display all available samples" ) );
    DiskCaching->setText( tr( "Use Disk Caching" ) );
    QToolTip::add( DiskCaching, tr( "Use Disk Caching of ObjectLists and Synonyms" ) );
    LocaleLabel->setText( tr( "Translation" ) );
    QToolTip::add( LocaleLabel, tr( "Which translation locale to use for this program. Must restart to have effect." ) );
    DisplayGrid->setText( tr( "Display gridlines in results" ) );
    QToolTip::add( DisplayGrid, tr( "Show grid lines in output results table." ) );
    ToadBindings->setText( tr( "Prefer TOAD key bindings" ) );
    QToolTip::add( ToadBindings, tr( "Use TOAD keybindings instead of classic TOra." ) );
}

void toGlobalSettingUI::helpBrowse()
{
    qWarning( "toGlobalSettingUI::helpBrowse(): Not implemented yet" );
}

void toGlobalSettingUI::sessionBrowse()
{
    qWarning( "toGlobalSettingUI::sessionBrowse(): Not implemented yet" );
}

void toGlobalSettingUI::pluginBrowse()
{
    qWarning( "toGlobalSettingUI::pluginBrowse(): Not implemented yet" );
}

void toGlobalSettingUI::sqlBrowse()
{
    qWarning( "toGlobalSettingUI::sqlBrowse(): Not implemented yet" );
}

