Logo Search packages:      
Sourcecode: bbconf version File versions  Download package

keyconf_base.cc

/***************************************************************************
                         -- keyconf_base.cc --
                         -------------------
    begin                : 2001-09-01
    copyright            : (C) 2001 - 2002
    authors              : Jason Kasper (vanRijn)
                         : Ben Jansens (xOr)
    URL                  : http://bbconf.sourceforge.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
 // E_O_H_VR
/****************************************************************************
** Form implementation generated from reading ui file 'ui/keyconf_base.ui'
**
** Created: Fri Jan 4 13:38:46 2002
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "keyconf_base.h"

#include <qbuttongroup.h>
#include <qframe.h>
#include <qheader.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include "my_kkeybutton.h"
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>


/* 
 *  Constructs a KeysConfBase which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 */
KeysConfBase::KeysConfBase( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
      setName( "KeysConfBase" );
    resize( 705, 557 ); 
    setCaption( tr( "Key Bindings" ) );
    setFocusPolicy( QWidget::StrongFocus );
    KeysConfBaseLayout = new QVBoxLayout( this ); 
    KeysConfBaseLayout->setSpacing( 6 );
    KeysConfBaseLayout->setMargin( 11 );

    listview = new QListView( this, "listview" );
    listview->addColumn( tr( "Action" ) );
    listview->addColumn( tr( "Current Key" ) );
    listview->addColumn( tr( "            bbkeysAction" ) );
    listview->header()->setClickEnabled( FALSE, listview->header()->count() - 1 );
    listview->header()->setResizeEnabled( FALSE, listview->header()->count() - 1 );
    listview->addColumn( tr( "            bbkeysKeyToGrab" ) );
    listview->header()->setClickEnabled( FALSE, listview->header()->count() - 1 );
    listview->header()->setResizeEnabled( FALSE, listview->header()->count() - 1 );
    QListViewItem * item_2 = new QListViewItem( listview, 0 );
    item_2->setOpen( TRUE );
    QListViewItem * item = new QListViewItem( item_2, 0 );
    item->setText( 0, tr( "Window Lower" ) );
    item->setText( 2, tr( "Lower" ) );
    item_2->setOpen( TRUE );
    item = new QListViewItem( item_2, item );
    item->setText( 0, tr( "Window Raise" ) );
    item->setText( 2, tr( "Raise" ) );
    item_2->setOpen( TRUE );
    item = new QListViewItem( item_2, item );
    item->setText( 0, tr( "Window Shade" ) );
    item->setText( 2, tr( "ShadeWindow" ) );
    item_2->setOpen( TRUE );
    item = new QListViewItem( item_2, item );
    item->setText( 0, tr( "Window Close" ) );
    item->setText( 2, tr( "Close" ) );
    item_2->setOpen( TRUE );
    item = new QListViewItem( item_2, item );
    item->setText( 0, tr( "Window Iconify" ) );
    item->setText( 2, tr( "Minimize" ) );
    item_2->setOpen( TRUE );
    item = new QListViewItem( item_2, item );
    item->setText( 0, tr( "Window Maximize" ) );
    item->setText( 2, tr( "MaximizeWindow" ) );
    item_2->setOpen( TRUE );
    item = new QListViewItem( item_2, item );
    item->setText( 0, tr( "Window Maximize Horizontal" ) );
    item->setText( 2, tr( "MaximizeHorizontal" ) );
    item_2->setOpen( TRUE );
    item = new QListViewItem( item_2, item );
    item->setText( 0, tr( "Window Maximize Vertical" ) );
    item->setText( 2, tr( "MaximizeVertical" ) );
    item_2->setOpen( TRUE );
    item = new QListViewItem( item_2, item );
    item->setText( 0, tr( "Window Stick/Unstick (Omnipresent)" ) );
    item->setText( 2, tr( "StickWindow" ) );
    item_2->setOpen( TRUE );
    item = new QListViewItem( item_2, item );
    item->setText( 0, tr( "Toggle Window Decorations" ) );
    item->setText( 2, tr( "ToggleDecor" ) );
    item_2->setText( 0, tr( "Window" ) );

    QListViewItem * item_3 = new QListViewItem( listview, item_2 );
    item_3->setOpen( TRUE );
    item = new QListViewItem( item_3, item_2 );
    item->setText( 0, tr( "Horizontal Shrink" ) );
    item->setText( 2, tr( "HorizontalDecrement" ) );
    item_3->setOpen( TRUE );
    item = new QListViewItem( item_3, item );
    item->setText( 0, tr( "Horizontal Grow" ) );
    item->setText( 2, tr( "HorizontalIncrement" ) );
    item_3->setOpen( TRUE );
    item = new QListViewItem( item_3, item );
    item->setText( 0, tr( "Vertical Shrink" ) );
    item->setText( 2, tr( "VerticalDecrement" ) );
    item_3->setOpen( TRUE );
    item = new QListViewItem( item_3, item );
    item->setText( 0, tr( "Vertical Grow" ) );
    item->setText( 2, tr( "VerticalIncrement" ) );
    item_3->setText( 0, tr( "Window Resizing" ) );

    QListViewItem * item_4 = new QListViewItem( listview, item_3 );
    item_4->setOpen( TRUE );
    item = new QListViewItem( item_4, item_3 );
    item->setText( 0, tr( "Move Up (Big)" ) );
    item->setText( 2, tr( "BigNudgeUp" ) );
    item_4->setOpen( TRUE );
    item = new QListViewItem( item_4, item );
    item->setText( 0, tr( "Move Down (Big)" ) );
    item->setText( 2, tr( "BigNudgeDown" ) );
    item_4->setOpen( TRUE );
    item = new QListViewItem( item_4, item );
    item->setText( 0, tr( "Move Left (Big)" ) );
    item->setText( 2, tr( "BigNudgeLeft" ) );
    item_4->setOpen( TRUE );
    item = new QListViewItem( item_4, item );
    item->setText( 0, tr( "Move Right (Big)" ) );
    item->setText( 2, tr( "BigNudgeRight" ) );
    item_4->setOpen( TRUE );
    item = new QListViewItem( item_4, item );
    item->setText( 0, tr( "Move Up (Small)" ) );
    item->setText( 2, tr( "NudgeUp" ) );
    item_4->setOpen( TRUE );
    item = new QListViewItem( item_4, item );
    item->setText( 0, tr( "Move Down (Small)" ) );
    item->setText( 2, tr( "NudgeDown" ) );
    item_4->setOpen( TRUE );
    item = new QListViewItem( item_4, item );
    item->setText( 0, tr( "Move Left (Small)" ) );
    item->setText( 2, tr( "NudgeLeft" ) );
    item_4->setOpen( TRUE );
    item = new QListViewItem( item_4, item );
    item->setText( 0, tr( "Move Right (Small)" ) );
    item->setText( 2, tr( "NudgeRight" ) );
    item_4->setText( 0, tr( "Window Movement" ) );

    QListViewItem * item_5 = new QListViewItem( listview, item_4 );
    item_5->setOpen( TRUE );
    item = new QListViewItem( item_5, item_4 );
    item->setText( 0, tr( "Walk through Windows" ) );
    item->setText( 2, tr( "NextWindow" ) );
    item_5->setOpen( TRUE );
    item = new QListViewItem( item_5, item );
    item->setText( 0, tr( "Walk through Windows (All Workspaces)" ) );
    item->setText( 2, tr( "NextWindowAllWorkspaces" ) );
    item_5->setOpen( TRUE );
    item = new QListViewItem( item_5, item );
    item->setText( 0, tr( "Walk through Windows (Reverse)" ) );
    item->setText( 2, tr( "PrevWindow" ) );
    item_5->setText( 0, tr( "Window Navigation" ) );

    QListViewItem * item_6 = new QListViewItem( listview, item_5 );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item_5 );
    item->setText( 0, tr( "Switch to Next Desktop" ) );
    item->setText( 2, tr( "NextWorkspace" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Previous Desktop" ) );
    item->setText( 2, tr( "PrevWorkspace" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 1" ) );
    item->setText( 2, tr( "Workspace1" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 2" ) );
    item->setText( 2, tr( "Workspace2" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 3" ) );
    item->setText( 2, tr( "Workspace3" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 4" ) );
    item->setText( 2, tr( "Workspace4" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 5" ) );
    item->setText( 2, tr( "Workspace5" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 6" ) );
    item->setText( 2, tr( "Workspace6" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 7" ) );
    item->setText( 2, tr( "Workspace7" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 8" ) );
    item->setText( 2, tr( "Workspace8" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 9" ) );
    item->setText( 2, tr( "Workspace9" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 10" ) );
    item->setText( 2, tr( "Workspace10" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 11" ) );
    item->setText( 2, tr( "Workspace11" ) );
    item_6->setOpen( TRUE );
    item = new QListViewItem( item_6, item );
    item->setText( 0, tr( "Switch to Desktop 12" ) );
    item->setText( 2, tr( "Workspace12" ) );
    item_6->setText( 0, tr( "Desktop Navigation" ) );

    QListViewItem * item_7 = new QListViewItem( listview, item_6 );
    item_7->setOpen( TRUE );
    item = new QListViewItem( item_7, item_6 );
    item->setText( 0, tr( "Switch One Desktop Up" ) );
    item->setText( 2, tr( "UpWorkspace" ) );
    item_7->setOpen( TRUE );
    item = new QListViewItem( item_7, item );
    item->setText( 0, tr( "Switch One Desktop Down" ) );
    item->setText( 2, tr( "DownWorkspace" ) );
    item_7->setOpen( TRUE );
    item = new QListViewItem( item_7, item );
    item->setText( 0, tr( "Switch One Desktop to the Left" ) );
    item->setText( 2, tr( "LeftWorkspace" ) );
    item_7->setOpen( TRUE );
    item = new QListViewItem( item_7, item );
    item->setText( 0, tr( "Switch One Desktop to the Right" ) );
    item->setText( 2, tr( "RightWorkspace" ) );
    item_7->setText( 0, tr( "Desktop Navigation (with bbpager)" ) );

    QListViewItem * item_8 = new QListViewItem( listview, item_7 );
    item_8->setOpen( TRUE );
    item = new QListViewItem( item_8, item_7 );
    item->setText( 0, tr( "* Click here to add a new command *" ) );
    item->setText( 2, tr( "AddCommand" ) );
    item_8->setText( 0, tr( "Command Keybindings" ) );

    listview->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, listview->sizePolicy().hasHeightForWidth() ) );
    listview->setAllColumnsShowFocus( TRUE );
    listview->setRootIsDecorated( TRUE );
    KeysConfBaseLayout->addWidget( listview );

    Line1 = new QFrame( this, "Line1" );
    Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken );
    KeysConfBaseLayout->addWidget( Line1 );

    keygroup = new QButtonGroup( this, "keygroup" );
    keygroup->setEnabled( FALSE );
    keygroup->setTitle( tr( "Choose a Key for the Selected Action" ) );
    keygroup->setColumnLayout(0, Qt::Vertical );
    keygroup->layout()->setSpacing( 0 );
    keygroup->layout()->setMargin( 0 );
    keygroupLayout = new QHBoxLayout( keygroup->layout() );
    keygroupLayout->setAlignment( Qt::AlignTop );
    keygroupLayout->setSpacing( 24 );
    keygroupLayout->setMargin( 11 );

    opt_nokey = new QRadioButton( keygroup, "opt_nokey" );
    opt_nokey->setText( tr( "No Key / Remove Key" ) );
    keygroupLayout->addWidget( opt_nokey );

    opt_custom_key = new QRadioButton( keygroup, "opt_custom_key" );
    opt_custom_key->setText( tr( "Custom Key" ) );
    keygroupLayout->addWidget( opt_custom_key );

    bKgrab = new KKeyButton( keygroup, "bKgrab" );
    keygroupLayout->addWidget( bKgrab );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    keygroupLayout->addItem( spacer );
    KeysConfBaseLayout->addWidget( keygroup );

    // signals and slots connections
    connect( opt_nokey, SIGNAL( clicked() ), this, SLOT( opt_nokeys_checked() ) );
    connect( listview, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( itemDoubleClicked(QListViewItem*) ) );
    connect( listview, SIGNAL( clicked(QListViewItem*) ), this, SLOT( itemClicked(QListViewItem*) ) );
    connect( listview, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( itemSelected(QListViewItem*) ) );
    connect( opt_custom_key, SIGNAL( clicked() ), this, SLOT( opt_customkey_checked() ) );
    connect( bKgrab, SIGNAL( capturedKey(uint) ), this, SLOT( modified() ) );
    connect( bKgrab, SIGNAL( capturedKey(uint) ), this, SLOT( capturedKey(uint) ) );
}

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

void KeysConfBase::capturedKey(uint)
{
    qWarning( "KeysConfBase::capturedKey(uint): Not implemented yet!" );
}

void KeysConfBase::grabKeys()
{
    qWarning( "KeysConfBase::grabKeys(): Not implemented yet!" );
}

void KeysConfBase::itemClicked(QListViewItem*)
{
    qWarning( "KeysConfBase::itemClicked(QListViewItem*): Not implemented yet!" );
}

void KeysConfBase::itemDoubleClicked(QListViewItem*)
{
    qWarning( "KeysConfBase::itemDoubleClicked(QListViewItem*): Not implemented yet!" );
}

void KeysConfBase::itemSelected(QListViewItem*)
{
    qWarning( "KeysConfBase::itemSelected(QListViewItem*): Not implemented yet!" );
}

void KeysConfBase::modified()
{
    qWarning( "KeysConfBase::modified(): Not implemented yet!" );
}

void KeysConfBase::opt_customkey_checked()
{
    qWarning( "KeysConfBase::opt_customkey_checked(): Not implemented yet!" );
}

void KeysConfBase::opt_nokeys_checked()
{
    qWarning( "KeysConfBase::opt_nokeys_checked(): Not implemented yet!" );
}


Generated by  Doxygen 1.6.0   Back to index