Qt Virtual Chart Table (QVCT)
COverlayObjectPickView.cpp
Go to the documentation of this file.
1 // INDENTING (emacs/vi): -*- mode:c++; tab-width:2; c-basic-offset:2; intent-tabs-mode:nil; -*- ex: set tabstop=2 expandtab:
2 
3 /*
4  * Qt Virtual Chart Table (QVCT)
5  * Copyright (C) 2012 Cedric Dufour <http://cedric.dufour.name>
6  * Author: Cedric Dufour <http://cedric.dufour.name>
7  *
8  * The Qt Virtual Chart Table (QVCT) is free software:
9  * you can redistribute it and/or modify it under the terms of the GNU General
10  * Public License as published by the Free Software Foundation, Version 3.
11  *
12  * The Qt Virtual Chart Table (QVCT) is distributed in the hope
13  * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
14  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  *
16  * See the GNU General Public License for more details.
17  */
18 
19 // QVCT
21 
22 
23 //------------------------------------------------------------------------------
24 // CONSTRUCTORS / DESTRUCTOR
25 //------------------------------------------------------------------------------
26 
27 COverlayObjectPickView::COverlayObjectPickView( const QTreeWidgetItem* _pqTreeWidgetItem, COverlayObject** _ppoOverlayObject )
28  : QDialog( 0 )
29  , pqTreeWidgetItem( _pqTreeWidgetItem )
30  , ppoOverlayObject( _ppoOverlayObject )
31  , pqComboBox( 0 )
32 {
33  QDialog::setWindowTitle( tr("Please Select")+"..." );
34  *_ppoOverlayObject = 0;
35 }
36 
37 
38 //------------------------------------------------------------------------------
39 // METHODS: QDialog (override)
40 //------------------------------------------------------------------------------
41 
43 {
44  if( pqComboBox ) *ppoOverlayObject = (COverlayObject*)pqTreeWidgetItem->child( pqComboBox->currentIndex() );
45  QDialog::accept();
46 }
const QTreeWidgetItem * pqTreeWidgetItem
Base overlay.
COverlayObject ** ppoOverlayObject
[out] Picked (selected) object
virtual void accept()
[override] QDialog::accept()
COverlayObjectPickView(const QTreeWidgetItem *_pqTreeWidgetItem, COverlayObject **_ppoOverlayObject)
QComboBox * pqComboBox
[UI:ComboBox] Objects combo-box
Generic overlay object.