File: inputwindow.h

package info (click to toggle)
skim 1.4.4-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,876 kB
  • ctags: 1,247
  • sloc: cpp: 9,421; python: 1,608; sh: 260; makefile: 68
file content (92 lines) | stat: -rw-r--r-- 2,628 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/***************************************************************************
 *   Copyright (C) 2003-2005 by liuspider                                  *
 *   liuspider@users.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.                                   *
 **************************************************************************/

#ifndef INPUTWINDOW_H
#define INPUTWINDOW_H

#include "src/skimpluginmanager.h"
#include "scimdragableframe.h"

#include <kaction.h>

class ScimLineEdit;
class ScimLookupTable;
class ScimStringListItem;

class QVBoxLayout;
class QHBoxLayout;
class QLabel;

class inputWindow : public ScimDragableFrame
{
    Q_OBJECT

public:
    inputWindow( SkimPluginManager*, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
    ~inputWindow();
    void toggleStick();

public slots:
    virtual void adjustSize();

    virtual void updateAuxString( const QString &, const scim::AttributeList & );
    virtual void updateLookupTable( const scim::LookupTable &table, size_t & exact_item_num );
    virtual void updatePreeditString(const QString &, const scim::AttributeList &);
    virtual void updateSpotLocation( int, int );

    virtual void showAuxString();
    virtual void showLookupTable();
    virtual void showPreeditString();

    virtual void hideAuxString();
    virtual void hideLookupTable();
    virtual void hidePreeditString();

    virtual void changeSetting();

protected:
    bool can_hide();
    inline void try_hide();
    QVBoxLayout* m_inputWindowLayout;
    int m_insertPointX, m_insertPointY;

protected slots:
    virtual void languageChange();
    void hideInputWindow ();
    void disableUpdates();
    void enableUpdates();

private:
    ScimLineEdit* m_preEditText;
    ScimStringListItem* m_auxText;
    ScimLookupTable* m_lookupLbl;

    SkimPluginManager* m_allModules;
    scim::SocketServerThread* m_inputServer;
    bool m_sticky, m_inTransaction;
    KToggleAction* m_stickAction;
};

#include "src/skimplugin.h"

class InputWindowPlugin : public SkimPlugin
{
Q_OBJECT
public:
    InputWindowPlugin( QObject *parent, const char *name, const QStringList &args );

    virtual ~InputWindowPlugin();
public slots:
    void toggleStick();
private:
    inputWindow* m_inputw;
};

#endif // INPUTWINDOW_H