VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITableView.h@ 64168

Last change on this file since 64168 was 64168, checked in by vboxsync, 9 years ago

FE/Qt: bugref:6899: Accessibility support (step 76): A bit of cleanup for QITableView.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 1.9 KB
Line 
1/* $Id: QITableView.h 64168 2016-10-06 14:55:18Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - Qt extensions: QITableView class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-2016 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___QITableView_h___
19#define ___QITableView_h___
20
21/* Qt includes: */
22#include <QTableView>
23
24
25/** QTableView subclass extending standard functionality. */
26class QITableView : public QTableView
27{
28 Q_OBJECT;
29
30signals:
31
32 /** Notifies listeners about index changed from @a previous to @a current. */
33 void sigCurrentChanged(const QModelIndex &current, const QModelIndex &previous);
34
35public:
36
37 /** Constructs table-view passing @a pParent to the base-class. */
38 QITableView(QWidget *pParent = 0);
39
40 /** Makes sure current editor data committed. */
41 void makeSureEditorDataCommitted();
42
43protected slots:
44
45 /** Stores the created @a pEditor for passed @a index in the map. */
46 virtual void sltEditorCreated(QWidget *pEditor, const QModelIndex &index);
47 /** Clears the destoyed @a pEditor from the map. */
48 virtual void sltEditorDestroyed(QObject *pEditor);
49
50protected:
51
52 /** Prepares all. */
53 virtual void prepare();
54
55 /** Handles index change from @a previous to @a current. */
56 virtual void currentChanged(const QModelIndex &current, const QModelIndex &previous) /* override */;
57
58 /** Holds the map of editors stored for passed indexes. */
59 QMap<QModelIndex, QObject*> m_editors;
60};
61
62#endif /* !___QITableView_h___ */
63
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette