~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to core/utilities/advancedrename/advancedrenameinput.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer, Rohan Garg, Philip Muškovac, Felix Geyer
  • Date: 2011-09-23 18:18:55 UTC
  • mfrom: (1.2.36 upstream)
  • Revision ID: package-import@ubuntu.com-20110923181855-ifs67wxkugshev9k
Tags: 2:2.1.1-0ubuntu1
[ Rohan Garg ]
* New upstream release (LP: #834190)
  - debian/control
    + Build with libqtwebkit-dev
 - debian/kipi-plugins-common
    + Install libkvkontakte required by kipi-plugins
 - debian/digikam
    + Install panoramagui

[ Philip Muškovac ]
* New upstream release
  - debian/control:
    + Add libcv-dev, libcvaux-dev, libhighgui-dev, libboost-graph1.46-dev,
      libksane-dev, libxml2-dev, libxslt-dev, libqt4-opengl-dev, libqjson-dev,
      libgpod-dev and libqca2-dev to build-deps
    + Add packages for kipi-plugins, libmediawiki, libkface, libkgeomap and
      libkvkontakte
  - debian/rules:
    + Don't build with gphoto2 since it doesn't build with it.
  - Add kubuntu_fix_test_linking.diff to fix linking of the dngconverter test
  - update install files
  - update kubuntu_01_mysqld_executable_name.diff for new cmake layout
    and rename to kubuntu_mysqld_executable_name.diff
* Fix typo in digikam-data description (LP: #804894)
* Fix Vcs links

[ Felix Geyer ]
* Move library data files to the new packages libkface-data, libkgeomap-data
  and libkvkontakte-data.
* Override version of the embedded library packages to 1.0~digikam<version>.
* Exclude the library packages from digikam-dbg to prevent file conflicts in
  the future.
* Call dh_install with --list-missing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ============================================================
 
2
 *
 
3
 * This file is a part of digiKam project
 
4
 * http://www.digikam.org
 
5
 *
 
6
 * Date        : 2009-09-03
 
7
 * Description : an input widget for the AdvancedRename utility
 
8
 *
 
9
 * Copyright (C) 2009-2010 by Andi Clemens <andi dot clemens at gmx dot net>
 
10
 *
 
11
 * This program is free software; you can redistribute it
 
12
 * and/or modify it under the terms of the GNU General
 
13
 * Public License as published by the Free Software Foundation;
 
14
 * either version 2, or (at your option)
 
15
 * any later version.
 
16
 *
 
17
 * This program is distributed in the hope that it will be useful,
 
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
 * GNU General Public License for more details.
 
21
 *
 
22
 * ============================================================ */
 
23
 
 
24
#ifndef ADVANCEDRENAMEINPUT_H
 
25
#define ADVANCEDRENAMEINPUT_H
 
26
 
 
27
// Qt includes
 
28
 
 
29
#include <QTextEdit>
 
30
#include <QWidget>
 
31
 
 
32
// KDE includes
 
33
 
 
34
#include <kcombobox.h>
 
35
 
 
36
// Local includes
 
37
 
 
38
#include "comboboxutilities.h"
 
39
#include "parser.h"
 
40
 
 
41
class QFocusEvent;
 
42
class QKeyEvent;
 
43
class QMouseEvent;
 
44
class QEvent;
 
45
 
 
46
namespace Digikam
 
47
{
 
48
 
 
49
class AdvancedRenameLineEditProxy : public ProxyLineEdit
 
50
{
 
51
    Q_OBJECT
 
52
 
 
53
public:
 
54
 
 
55
    AdvancedRenameLineEditProxy(QWidget* parent);
 
56
    virtual void setWidget(QWidget* widget);
 
57
 
 
58
protected:
 
59
 
 
60
    virtual void mousePressEvent(QMouseEvent* event);
 
61
    virtual void mouseReleaseEvent(QMouseEvent* event);
 
62
 
 
63
private:
 
64
 
 
65
    AdvancedRenameLineEditProxy(const AdvancedRenameLineEditProxy&);
 
66
    AdvancedRenameLineEditProxy& operator=(const AdvancedRenameLineEditProxy&);
 
67
};
 
68
 
 
69
// --------------------------------------------------------
 
70
 
 
71
class AdvancedRenameLineEdit : public QTextEdit
 
72
{
 
73
    Q_OBJECT
 
74
 
 
75
public:
 
76
 
 
77
    AdvancedRenameLineEdit(QWidget* parent = 0);
 
78
    ~AdvancedRenameLineEdit();
 
79
 
 
80
    void    setParser(Parser* parser);
 
81
    Parser* parser() const;
 
82
 
 
83
    void setParseTimerDuration(int milliseconds);
 
84
 
 
85
public Q_SLOTS:
 
86
 
 
87
    void slotSetText(const QString&);
 
88
    void slotCursorPositionChanged();
 
89
 
 
90
Q_SIGNALS:
 
91
 
 
92
    void signalTextChanged(const QString&);
 
93
    void signalTokenMarked(bool);
 
94
    void signalReturnPressed();
 
95
 
 
96
protected:
 
97
 
 
98
    virtual void keyPressEvent(QKeyEvent* e);
 
99
    virtual void wheelEvent(QWheelEvent* e);
 
100
    virtual void scrollContentsBy(int dx, int dy);
 
101
 
 
102
private Q_SLOTS:
 
103
 
 
104
    void slotTextChanged();
 
105
    void slotParseTimer();
 
106
 
 
107
private:
 
108
 
 
109
    AdvancedRenameLineEdit(const AdvancedRenameLineEdit&);
 
110
    AdvancedRenameLineEdit& operator=(const AdvancedRenameLineEdit&);
 
111
 
 
112
private:
 
113
 
 
114
    class AdvancedRenameLineEditPriv;
 
115
    AdvancedRenameLineEditPriv* const d;
 
116
};
 
117
 
 
118
// --------------------------------------------------------
 
119
 
 
120
class AdvancedRenameInput : public KComboBox
 
121
{
 
122
    Q_OBJECT
 
123
 
 
124
public:
 
125
 
 
126
    AdvancedRenameInput(QWidget* parent = 0);
 
127
    ~AdvancedRenameInput();
 
128
 
 
129
    void setParser(Parser* parser);
 
130
    void setParseTimerDuration(int milliseconds);
 
131
 
 
132
    QString text() const;
 
133
    void    setText(const QString& text);
 
134
 
 
135
Q_SIGNALS:
 
136
 
 
137
    void signalTextChanged(const QString&);
 
138
    void signalTokenMarked(bool);
 
139
    void signalReturnPressed();
 
140
 
 
141
public Q_SLOTS:
 
142
 
 
143
    void slotAddToken(const QString&);
 
144
    void slotClearText();
 
145
    void slotClearTextAndHistory();
 
146
    void slotSetFocus();
 
147
 
 
148
    void slotHighlightLineEdit();
 
149
    void slotHighlightLineEdit(const QString& word);
 
150
 
 
151
protected:
 
152
 
 
153
    virtual void changeEvent(QEvent* e);
 
154
 
 
155
private Q_SLOTS:
 
156
 
 
157
    void slotClearButtonPressed();
 
158
 
 
159
private:
 
160
 
 
161
    AdvancedRenameInput(const AdvancedRenameInput&);
 
162
    AdvancedRenameInput& operator=(const AdvancedRenameInput&);
 
163
 
 
164
    void readSettings();
 
165
    void writeSettings();
 
166
    void enableHighlighter(bool enable);
 
167
 
 
168
private:
 
169
 
 
170
    class AdvancedRenameInputPriv;
 
171
    AdvancedRenameInputPriv* const d;
 
172
};
 
173
 
 
174
}  // namespace Digikam
 
175
 
 
176
#endif /* ADVANCEDRENAMEINPUT_H */