~ubuntu-branches/ubuntu/wily/psi/wily-proposed

« back to all changes in this revision

Viewing changes to src/psifilteredcontactlistview.h

  • Committer: Package Import Robot
  • Author(s): Jan Niehusmann
  • Date: 2014-07-01 21:49:34 UTC
  • mfrom: (6.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20140701214934-gt4dkgm94byi4vnn
Tags: 0.15-1
* New upstream version
* set debhelper compat level to 9
* set Standards-Version to 3.9.5 (no further changes)
* add lintian override regarding license-problem-non-free-RFC
* use qconf to regenerate configure script
* implement hardening using buildflags instead of hardening-wrapper

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * psifilteredcontactlistview.h
 
3
 * Copyright (C) 2010  Yandex LLC (Michail Pishchagin)
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU General Public License
 
7
 * as published by the Free Software Foundation; either version 2
 
8
 * of the License, or (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this library; if not, write to the Free Software
 
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
18
 *
 
19
 */
 
20
 
 
21
#ifndef PSIFILTEREDCONTACTLISTVIEW_H
 
22
#define PSIFILTEREDCONTACTLISTVIEW_H
 
23
 
 
24
#include "psicontactlistview.h"
 
25
 
 
26
class PsiFilteredContactListView : public PsiContactListView
 
27
{
 
28
        Q_OBJECT
 
29
public:
 
30
        PsiFilteredContactListView(QWidget* parent);
 
31
 
 
32
        bool handleKeyPressEvent(QKeyEvent* e);
 
33
 
 
34
signals:
 
35
        void quitFilteringMode();
 
36
 
 
37
private:
 
38
        enum Direction {
 
39
                Forward,
 
40
                Backward
 
41
        };
 
42
        void moveSelection(uint delta, Direction direction);
 
43
        void selectIndex(int row);
 
44
 
 
45
        bool extendSelection() const;
 
46
 
 
47
protected:
 
48
        // reimplemented
 
49
        virtual void itemActivated(const QModelIndex& index);
 
50
};
 
51
 
 
52
#endif