| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/drivers/qt/TeAddressNotifyFunctorWindow.h
Go to the documentation of this file.

    00001 /************************************************************************************
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright © 2001-2007 INPE and Tecgraf/PUC-Rio.
    00004
    00005 This code is part of the TerraLib library.
    00006 This library is free software; you can redistribute it and/or
    00007 modify it under the terms of the GNU Lesser General Public
    00008 License as published by the Free Software Foundation; either
    00009 version 2.1 of the License, or (at your option) any later version.
    00010
    00011 You should have received a copy of the GNU Lesser General Public
    00012 License along with this library.
    00013
    00014 The authors reassure the license terms regarding the warranties.
    00015 They specifically disclaim any warranties, including, but not limited to,
    00016 the implied warranties of merchantability and fitness for a particular purpose.
    00017 The library provided hereunder is on an "as is" basis, and the authors have no
    00018 obligation to provide maintenance, support, updates, enhancements, or modifications.
    00019 In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
    00020 indirect, special, incidental, or consequential damages arising out of the use
    00021 of this library and its documentation.
    00022 *************************************************************************************/
    00031 #ifndef  __TERRALIB_INTERNAL_ADDRESSNOTIFYFUNCTORWINDOW_H
    00032 #define  __TERRALIB_INTERNAL_ADDRESSNOTIFYFUNCTORWINDOW_H
    00033
    00034 #include <TeAddressLocator.h>
    00035 #include <addressChoiceWindow.h>
    00036 #include <qcheckbox.h>
    00037
    00039 class TeAdressNotifyFunctorWindow : public TeAbstractAddressNotifyFunctor
    00040 {
    00041            protected:
    00042
    00043                       QDialog* w_;
    00044                       bool selectFirst_;
    00045                       bool selectAllVisible_;
    00046
    00047            public:
    00048
    00049                       TeAdressNotifyFunctorWindow(QDialog* w, const bool& selectAllVisible = true)
    00050                                  : w_(w), selectFirst_(false), selectAllVisible_(selectAllVisible)
    00051                       {
    00052                       }
    00053
    00054                       virtual ~TeAdressNotifyFunctorWindow()
    00055                       {
    00056                       }
    00057
    00058                       int operator()(const TeAddress& searchedAddress, vector<TeAddressDescription>& foundAddresses)
    00059                       {
    00060                                  if(selectFirst_)
    00061                                             return 0;
    00062
    00063                                  AddressChoiceWindow *addWindow = new AddressChoiceWindow(w_, "addWindow", true);
    00064
    00065                                  addWindow->listSearchedAddress(searchedAddress);
    00066
    00067                                  addWindow->listFoundedAddressListBox(foundAddresses);
    00068
    00069                                  addWindow->selectAllCheckBoxVisible(selectAllVisible_);
    00070
    00071                                  if(addWindow->exec() != QDialog::Accepted)
    00072                                             return -1;
    00073
    00074                                  int ret = addWindow->getChoosedAddress();
    00075
    00076                                  selectFirst_ = addWindow->selectAllCheckBox->isOn();
    00077
    00078                                  delete addWindow;
    00079
    00080                                  return ret;
    00081                       }
    00082 };
    00083
    00084 #endif     // __TERRALIB_INTERNAL_ADDRESSNOTIFYFUNCTORWINDOW_H

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines