-Code formatted using script
[qtrapids] / src / plugins / searchplugin / SearchPlugin.cpp
index 10165f0..65f3b89 100644 (file)
 namespace qtrapids
 {
 <<<<<<< .mine
-       SearchPlugin::SearchPlugin() : 
-               comboBox_(NULL), searchLine_(NULL), searchButton_(NULL), host_(NULL)
-       {
-               // TODO: Parse engine descriptions.
-               // -Add engines to model
-               // -Show model in comboBox
-       
-       }
-       
-       void SearchPlugin::initialize(PluginHostInterface* host)
-       {
-               host_ = host;
-               
-               if (host_ != NULL) {
-                       
-                       QWidget *pluginWidget = new QWidget;
-                       QVBoxLayout *vbox = new QVBoxLayout;
-                       QHBoxLayout *hbox = new QHBoxLayout;
-                       comboBox_ = new QComboBox;
-                       searchLine_ = new QLineEdit;
-                       searchButton_ = new QPushButton("Search");
-                       
-                       hbox->addWidget(searchLine_);
-                       hbox->addWidget(searchButton_);
-                       vbox->addWidget(comboBox_);
-                       vbox->addLayout(hbox);
-                       pluginWidget->setLayout(vbox);
-       
-                       connect(searchButton_, SIGNAL(clicked()), this, SLOT(on_searchButton_clicked()));
-                       //connect(this, SIGNAL(searchResult(QWidget*)), this, SLOT(on_searchResult(QWidget*)));
-                       
-                       host_->setGui(this, pluginWidget);
-               }
-       }
-       
-       QWidget* SearchPlugin::getGui()
-       {
-               return NULL;
-       }
-       
-       void SearchPlugin::on_searchButton_clicked()
-       {
-               QUrl searchUrl(QString("http://www.google.fi/search?q="
-                       + searchLine_->text()));
-               qDebug() << searchUrl;
-               QWebView *result = new QWebView;
-               result->load(searchUrl);
-               
-               on_searchResult((QWidget*)result);
-       }
-       
-       void SearchPlugin::on_searchResult(QWidget* resultWidget)
-       {
-               qDebug() << "on_searchResult()";
-               if (host_) {
-                       host_->addPluginWidget(this, resultWidget);
-               }
-       }
-=======
 SearchPlugin::SearchPlugin() :
         comboBox_(NULL), searchLine_(NULL), searchButton_(NULL), host_(NULL)
 {
     // TODO: Parse engine descriptions.
     // -Add engines to model
     // -Show model in comboBox
->>>>>>> .r31
+
+}
+
+void SearchPlugin::initialize(PluginHostInterface* host)
+{
+    host_ = host;
+
+    if (host_ != NULL)
+    {
+
+        QWidget *pluginWidget = new QWidget;
+        QVBoxLayout *vbox = new QVBoxLayout;
+        QHBoxLayout *hbox = new QHBoxLayout;
+        comboBox_ = new QComboBox;
+        searchLine_ = new QLineEdit;
+        searchButton_ = new QPushButton("Search");
+
+        hbox->addWidget(searchLine_);
+        hbox->addWidget(searchButton_);
+        vbox->addWidget(comboBox_);
+        vbox->addLayout(hbox);
+        pluginWidget->setLayout(vbox);
+
+        connect(searchButton_, SIGNAL(clicked()), this, SLOT(on_searchButton_clicked()));
+        //connect(this, SIGNAL(searchResult(QWidget*)), this, SLOT(on_searchResult(QWidget*)));
+
+        host_->setGui(this, pluginWidget);
+    }
+}
+
+QWidget* SearchPlugin::getGui()
+{
+    return NULL;
+}
+
+void SearchPlugin::on_searchButton_clicked()
+{
+    QUrl searchUrl(QString("http://www.google.fi/search?q="
+                           + searchLine_->text()));
+    qDebug() << searchUrl;
+    QWebView *result = new QWebView;
+    result->load(searchUrl);
+
+    on_searchResult((QWidget*)result);
+}
+
+void SearchPlugin::on_searchResult(QWidget* resultWidget)
+{
+    qDebug() << "on_searchResult()";
+    if (host_)
+    {
+        host_->addPluginWidget(this, resultWidget);
+    }
+}
+=======
+    SearchPlugin::SearchPlugin() :
+            comboBox_(NULL), searchLine_(NULL), searchButton_(NULL), host_(NULL)
+{
+    // TODO: Parse engine descriptions.
+    // -Add engines to model
+    // -Show model in comboBox
+    >>>>>>> .r31
 
 }