# Source: klineakconfig/klineakdef.h |
Annotated List
Files
Globals
Hierarchy
Index

    /***************************************************************************
                              klineakdef.h  -  description
                                 -------------------
        begin                : Sun Jun 9 2002
        copyright            : (C) 2002 by Sheldon Lee Wen
        email                : leewsb@hotmail.com
     ***************************************************************************/

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

    #ifndef KLINEAKDEF_H
    #define KLINEAKDEF_H

    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include "klineakdefui.h"
    #include "lineakparser.h"

    extern "C" {
      #include
      #include
      #include
      #include
      #include
      #include
      #include
    }

    #define DEF_HEADER \
    "# LinEAK - Linux support for Easy Access and Internet Keyboards\n" \
    "#  Copyright (c) 2001,2002 Mark Smulders \n" \
    "#  http://lineak.sourceforge.net\n" \
    "#\n" \
    "# keyboard definition file:\n" \
    "#   this file defines the extra keys of the keyboard types,\n" \
    "#   and the corresponding keycode.\n" \
    "#\n" \
    "# if your keyboard is not in here, please send me an e-mail so\n" \
    "# I can add support for it.\n" \
    "#\n" \
    "# WARNING: this definition file is NOT compatible with\n" \
    "#          lineakd 0.1 and 0.2\n" \
    "#          lineakconfig 0.1\n" \
    "\n"

    /**
      *@author Sheldon Lee Wen
      */

    class KlineakDef : public KlineakDefUI  {
       Q_OBJECT
    public:
    	KlineakDef(QWidget *parent=0, const char *name=0);
    	~KlineakDef();
    	bool  x11Event( XEvent* event);
    	QString hashKbIdent();

    private:
     	int lastKeyCode;
        QString currentKeyName;
      	EAKeyboard myKeyboard;
       KURL picture;
       bool isEAK(XKeyEvent *e);
       /** map for the kbtype to the full name */
       map keys2codes;

    public slots: // Public slots
      /** Triggered when the user hits the Apply button */
      virtual void onApplyButtonClicked();
      /** Triggered when the user presses the "Close" button */
      virtual void onQuitButtonClicked();
      /** Triggered when the user hits the Clear Key button */
      virtual void onClearKeyButtonClicked();
      /** Triggered when the user hits the Clear All button */
      virtual void onClearAllButtonClicked();
      /** Triggered when the user hits the "Submit my Keyboard" button */
      virtual void onSubmitButtonClicked();
      /** Triggered when the user hits the "Choose Picture" button */
      virtual void onPictureButtonClicked();
      /** Update the model text of our keyboard. */
      virtual void updateModel(const QString &model);
      /** Update the name of the current key */
      virtual void updateKeyname(const QString &keyname);
      /** Update the brand for our keyboard */
      virtual void updateBrand(const QString &brand);
      /** Update the information for the selected key */
      virtual void updateKeyinfo(const QString &key);
      /** Write out the definition file */
      virtual QString saveDefFile() ;

    signals: // Signals
      /** Emitted when the user clicks the Apply button. */
      void applying(QString);
      /** Emitted when the user clicks Quit. */
      void quitting();
      /** Emitted when the user sets the picture for the keyboard */
      void setPicture(KURL);
      /** Emitted to relay the hashed name of the keyboard so that lineakconfig
      			can set it as the default */
      void keyboardName(QString);
    public slots: // Public slots
      /** Parse the user defined keyboard file if it exists and load it into the gui. */
      void parseUserDef();
    };

    #endif

Generated by: sheldonl on shugaru on Thu Oct 10 23:58:14 2002, using kdoc 2.0a53.