Back to index

unity  6.0.0
Public Types | Public Member Functions | Public Attributes | Private Attributes
unity::hud::Hud Class Reference

#include <Hud.h>

Collaboration diagram for unity::hud::Hud:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::shared_ptr< HudPtr
typedef std::deque< Query::PtrQueries

Public Member Functions

 Hud (std::string const &dbus_name, std::string const &dbus_path)
 ~Hud ()
 Hud (const Hud &rhs)
Hudoperator= (Hud)
void RequestQuery (std::string const &search_string)
void ExecuteQuery (Query::Ptr query, unsigned int timestamp)
void ExecuteQueryBySearch (std::string execute_string, unsigned int timestamp)
void CloseQuery ()

Public Attributes

nux::Property< std::string > target
nux::Property< bool > connected
sigc::signal< void, Queriesqueries_updated

Private Attributes

HudImplpimpl_

Detailed Description

Definition at line 71 of file Hud.h.


Member Typedef Documentation

typedef std::shared_ptr<Hud> unity::hud::Hud::Ptr

Definition at line 74 of file Hud.h.

typedef std::deque<Query::Ptr> unity::hud::Hud::Queries

Definition at line 75 of file Hud.h.


Constructor & Destructor Documentation

unity::hud::Hud::Hud ( std::string const &  dbus_name,
std::string const &  dbus_path 
)

Definition at line 198 of file Hud.cpp.

    : connected(false)
    , pimpl_(new HudImpl(dbus_name, dbus_path, this))
{
  pimpl_->parent_ = this;
}

Definition at line 206 of file Hud.cpp.

{
  delete pimpl_;
}
unity::hud::Hud::Hud ( const Hud rhs)

Member Function Documentation

Definition at line 250 of file Hud.cpp.

{
  //Send close hint to the hud
  pimpl_->CloseQuery();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void unity::hud::Hud::ExecuteQuery ( Query::Ptr  query,
unsigned int  timestamp 
)

Definition at line 226 of file Hud.cpp.

{
  LOG_DEBUG(logger) << "Executing query: " << query->formatted_text;
  pimpl_->ExecuteByKey(query->key, timestamp);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void unity::hud::Hud::ExecuteQueryBySearch ( std::string  execute_string,
unsigned int  timestamp 
)

Definition at line 232 of file Hud.cpp.

{
  //Does a search then executes the result based on that search
  LOG_DEBUG(logger) << "Executing by string" << execute_string;
  if (pimpl_->query_key_ != NULL)
  {
    CloseQuery();
  }

  GVariant* paramaters = g_variant_new("(si)",
                                       execute_string.c_str(),
                                       1);

  auto functor = sigc::mem_fun(this->pimpl_, &HudImpl::ExecuteQueryByStringCallback);

  pimpl_->proxy_.Call("StartQuery", paramaters, sigc::bind(functor, timestamp));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Hud& unity::hud::Hud::operator= ( Hud  )
void unity::hud::Hud::RequestQuery ( std::string const &  search_string)

Definition at line 211 of file Hud.cpp.

{
  LOG_DEBUG(logger) << "Getting Query: " << search_string;
  if (pimpl_->query_key_ != NULL)
  {
    CloseQuery();
  }

  GVariant* paramaters = g_variant_new("(si)",
                                       search_string.c_str(),
                                       request_number_of_results);
  pimpl_->proxy_.Call("StartQuery", paramaters, sigc::mem_fun(this->pimpl_, &HudImpl::QueryCallback));
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

nux::Property<bool> unity::hud::Hud::connected

Definition at line 91 of file Hud.h.

Definition at line 121 of file Hud.h.

Definition at line 118 of file Hud.h.

nux::Property<std::string> unity::hud::Hud::target

Definition at line 90 of file Hud.h.


The documentation for this class was generated from the following files: