• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

lokalize

  • sources
  • kde-4.14
  • kdesdk
  • lokalize
  • src
  • webquery
myactioncollectionview.cpp
Go to the documentation of this file.
1 /*****************************************************************************
2  This file is part of KAider
3 
4  Copyright (C) 2007 by Nick Shaforostoff <shafff@ukr.net>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  In addition, as a special exception, the copyright holders give
21  permission to link the code of this program with any edition of
22  the Qt library by Trolltech AS, Norway (or with modified versions
23  of Qt that use the same license as Qt), and distribute linked
24  combinations including the two. You must obey the GNU General
25  Public License in all respects for all of the code used other than
26  Qt. If you modify this file, you may extend this exception to
27  your version of the file, but you are not obligated to do so. If
28  you do not wish to do so, delete this exception statement from
29  your version.
30 
31 **************************************************************************** */
32 
33 #include "myactioncollectionview.h"
34 #include "webquerycontroller.h"
35 #include "project.h"
36 
37 #include <QMetaObject>
38 #include <kross/ui/model.h>
39 #include <kross/core/action.h>
40 
41 using namespace Kross;
42 
43 MyActionCollectionView::MyActionCollectionView(QWidget *parent)
44  : Kross::ActionCollectionView(parent)
45 {
46  setSelectionMode(QAbstractItemView::MultiSelection);
47  //qRegisterMetaType<CatalogData>("CatalogData");
48 }
49 
50 
51 MyActionCollectionView::~MyActionCollectionView()
52 {
53 }
54 
55 void MyActionCollectionView::triggerSelectedActions()
56 {
57  foreach(const QModelIndex &index, itemSelection().indexes())
58  {
59  Action* action = ActionCollectionModel::action(index);
60  static_cast<WebQueryController*>(action->object("WebQueryController"))->query(data);
61 
62 
63  //we pass us into the queue.
64 // kWarning()<<action->object("WebQueryController");
65 // Project::instance()->aaaaa()->postQuery(data,
66 // static_cast<WebQueryController*>(action->object("WebQueryController")));
67 // QMetaObject::invokeMethod(action->object("WebQueryController"),
68 // SLOT(query(const CatalogData&)),
69 // Q_ARG(CatalogData,data)
70 // );
71 // connect(this,SIGNAL(query(const CatalogData&)),
72 // action->object("WebQueryController"),SLOT(query(const CatalogData&)),Qt::QueuedConnection);
73 // emit query(data);
74 // disconnect(this,SIGNAL(query(const CatalogData&)),
75 // action->object("WebQueryController"),SLOT(query(const CatalogData&)));
76 
77  }
78 
79 }
80 
81 #include "myactioncollectionview.moc"
82 
QModelIndex
project.h
QWidget
WebQueryController
uses async http reading.
Definition: webquerycontroller.h:64
myactioncollectionview.h
MyActionCollectionView::data
CatalogData data
Definition: myactioncollectionview.h:60
MyActionCollectionView::~MyActionCollectionView
~MyActionCollectionView()
Definition: myactioncollectionview.cpp:51
MyActionCollectionView::MyActionCollectionView
MyActionCollectionView(QWidget *parent=0)
Definition: myactioncollectionview.cpp:43
MyActionCollectionView::query
void query(const CatalogData &data)
webquerycontroller.h
MyActionCollectionView::triggerSelectedActions
void triggerSelectedActions()
Definition: myactioncollectionview.cpp:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

lokalize

Skip menu "lokalize"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal