summaryrefslogtreecommitdiffstats
path: root/ksayit/src/ksayitviewimpl.h
blob: 745bd3ac18bb4704bd3fe3c5ebcf46206aa108b6 (plain)
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
93
94
95
96
97
98
/***************************************************************************
                          ksayitviewimpl.h  -  description
                             -------------------
    begin                : Son Aug 10 2003
    copyright            : (C) 2003 by Robert Vogl
    email                : voglrobe@saphir
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 KSAYITVIEWIMPL_H
#define KSAYITVIEWIMPL_H

// QT includes
#include <tqwidget.h>
#include <tqstring.h>

// KDE includes

// App includes
#include <KSayItView.h>

/**
  *@author Robert Vogl
  */

class KSayItViewImpl : public KSayItView  {
   Q_OBJECT
  

public: 
    KSayItViewImpl(TQWidget *parent=0, const char *name=0);
    ~KSayItViewImpl();

signals:
  void signalSetCaption(const TQString &caption);
  void signalShowStatus(const TQString &status);
  void signalEnableCopyCut(bool enable);
  
  /** Emitted when the text in the TextEditor view cahnges.
   * \param empty True if the TextEditor view is empty. 
   */
  void signalTextChanged(bool empty);

public slots:
  /** True if text is selected or false if text is deselected.
   */
  void slotCopyAvailable(bool available);
  
  /** Copy selected text to the clipboard.
   */
  void slotCopy();
  
  /** Copy selected text to the clipboard and delete it.
   */
  void slotCut();
  
  /** Paste text from the clipboard to the texteditor.
   */
  void slotPaste();
  
private slots:
  /** Called from the widget
   */
  void slotTextChanged();

public: // Methods
  /** Returns the text of the TextEdit-Widget
   */
  TQString& getText();
  
  /** Set the content of the textEdit-Widget to text
   */
  void setText(const TQString &text);
  
  /** Enables/disables the Textedit
   * \param enable true=enabled, false=diabled
   */
  void enableTextedit( bool enable );
  
  /** Deletes the entire text of the texteditor.
   */
  void textClear();

private: 
  TQString t;

     
};

#endif