src/hbinput/inputwidgets/hbinputcommondialogs.cpp
changeset 5 627c4a0fd0e7
parent 2 06ff229162e9
child 6 c3690ec91ef8
equal deleted inserted replaced
3:11d3954df52a 5:627c4a0fd0e7
    29 #include <hbselectiondialog.h>
    29 #include <hbselectiondialog.h>
    30 #include <hblistwidgetitem.h>
    30 #include <hblistwidgetitem.h>
    31 #include <hbinpututils.h>
    31 #include <hbinpututils.h>
    32 #include <hbinputsettingproxy.h>
    32 #include <hbinputsettingproxy.h>
    33 #include <hbinputmethod.h>
    33 #include <hbinputmethod.h>
       
    34 #include <hbinputregioncollector_p.h>
    34 
    35 
    35 #include "hbinputcommondialogs.h"
    36 #include "hbinputcommondialogs.h"
    36 
    37 
    37 /// @cond
    38 /// @cond
    38 
    39 
    95     langDialog->setWidgetItems(listItems, true);
    96     langDialog->setWidgetItems(listItems, true);
    96     langDialog->setSelectionMode(HbAbstractItemView::SingleSelection);
    97     langDialog->setSelectionMode(HbAbstractItemView::SingleSelection);
    97     langDialog->setDismissPolicy(HbPopup::NoDismiss);
    98     langDialog->setDismissPolicy(HbPopup::NoDismiss);
    98     langDialog->setModal(true);
    99     langDialog->setModal(true);
    99     //langDialog->exec(); TODO
   100     //langDialog->exec(); TODO
       
   101     HbInputRegionCollector::instance()->attach(langDialog);
   100     //TODO: needed to check from action which button was pressed (ok, cancel)
   102     //TODO: needed to check from action which button was pressed (ok, cancel)
   101     //HbAction* action = langDialog->exec();
   103     //HbAction* action = langDialog->exec();
   102     if (langDialog->selectedItems().count()) {
   104     if (langDialog->selectedItems().count()) {
   103         int selection = langDialog->selectedItems().at(0).toInt();
   105         int selection = langDialog->selectedItems().at(0).toInt();
   104         HbInputLanguage result;
   106         HbInputLanguage result;
   152     methodDialog->setWidgetItems(listItems, true);
   154     methodDialog->setWidgetItems(listItems, true);
   153     methodDialog->setSelectionMode(HbAbstractItemView::SingleSelection);
   155     methodDialog->setSelectionMode(HbAbstractItemView::SingleSelection);
   154     methodDialog->setDismissPolicy(HbPopup::NoDismiss);
   156     methodDialog->setDismissPolicy(HbPopup::NoDismiss);
   155     methodDialog->setModal(true);
   157     methodDialog->setModal(true);
   156     //methodDialog->exec(); TODO
   158     //methodDialog->exec(); TODO
       
   159     HbInputRegionCollector::instance()->attach(methodDialog);
   157     //TODO: needed to check from action which button was pressed (ok, cancel)
   160     //TODO: needed to check from action which button was pressed (ok, cancel)
   158     //HbAction* action = langDialog->exec();
   161     //HbAction* action = langDialog->exec();
   159 
   162 
   160     HbInputMethodDescriptor result;
   163     HbInputMethodDescriptor result;
   161     if (methodDialog->selectedItems().count()) {
   164     if (methodDialog->selectedItems().count()) {