Restructured the SqlEngine. Not yet finished (see "TODO" in the code).
[toast/confclerk.git] / src / gui / searchtabcontainer.h
index e1605a8c6567cb0380e8936b65ef0ea99f1c3722..c835f56eac65919386c259e15ddef6b20d8106de 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
 #ifndef SEARCHTAB_H_
 #define SEARCHTAB_H_
 
-#include <QWidget>
+#include <QtGui>
 
 #include "tabcontainer.h"
 #include "searchhead.h"
+#include "sqlengine.h"
 
 class SearchTabContainer: public TabContainer {
     Q_OBJECT
+private:
+    SqlEngine* sqlEngine;
 public:
     SearchTabContainer(QWidget *aParent);
-    virtual ~SearchTabContainer();
+    virtual ~SearchTabContainer() {}
+    void setSqlEngine(SqlEngine* sqlEngine) {this->sqlEngine = sqlEngine;}
+    bool searchDialogIsVisible() const;
+    int searchResultCount(const QDate& date) const; ///< returns the number of events found on that specific date
+
 protected:
     virtual void loadEvents( const QDate &aDate, const int aConferenceId );
+
+signals:
+    void searchResultChanged();
+
 public slots:
-    void searchAgainClicked(); // made it public - to show header when 1.st conf importing is done successfuly
+    void showSearchDialog(bool show=true);
+
 private slots:
     void searchButtonClicked();