added first version of advanced search window to the GUI
This commit is contained in:
parent
c87ffbf5a0
commit
27b8a27807
6 changed files with 118 additions and 31 deletions
|
@ -21,8 +21,8 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.2 $
|
Version : $Revision: 1.3 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/Notebook.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/Notebook.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -64,8 +64,8 @@ Notebook :: Notebook(void) throw ()
|
||||||
tabBox = Gtk::manage(new Gtk::HBox());
|
tabBox = Gtk::manage(new Gtk::HBox());
|
||||||
pageHolder = Gtk::manage(new Gtk::Alignment());
|
pageHolder = Gtk::manage(new Gtk::Alignment());
|
||||||
|
|
||||||
layout->attach(*tabBox, 0, 1, 0, 1);
|
layout->attach(*tabBox, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 5, 5);
|
||||||
layout->attach(*pageHolder, 0, 1, 1, 2);
|
layout->attach(*pageHolder, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 5, 5);
|
||||||
|
|
||||||
add(*layout);
|
add(*layout);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Author : $Author: fgerlits $
|
# Author : $Author: fgerlits $
|
||||||
# Version : $Revision: 1.29 $
|
# Version : $Revision: 1.30 $
|
||||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $
|
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $
|
||||||
#
|
#
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
@ -268,6 +268,9 @@ start: ${SCHEDULER_EXE}
|
||||||
stop: ${SCHEDULER_EXE}
|
stop: ${SCHEDULER_EXE}
|
||||||
${MAKE} -C ${SCHEDULER_DIR} stop
|
${MAKE} -C ${SCHEDULER_DIR} stop
|
||||||
|
|
||||||
|
status: ${SCHEDULER_EXE}
|
||||||
|
${MAKE} -C ${SCHEDULER_DIR} status
|
||||||
|
|
||||||
uninstall: ${SCHEDULER_EXE}
|
uninstall: ${SCHEDULER_EXE}
|
||||||
-${MAKE} -C ${SCHEDULER_DIR} uninstall
|
-${MAKE} -C ${SCHEDULER_DIR} uninstall
|
||||||
-${MAKE} -C ${STORAGE_SERVER_DIR} db_clean
|
-${MAKE} -C ${STORAGE_SERVER_DIR} db_clean
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.1 $
|
Version : $Revision: 1.2 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.cxx,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.cxx,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -37,6 +37,11 @@
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "LiveSupport/Widgets/WidgetFactory.h"
|
#include "LiveSupport/Widgets/WidgetFactory.h"
|
||||||
|
#include "LiveSupport/Widgets/Notebook.h"
|
||||||
|
#include "LiveSupport/Widgets/Button.h"
|
||||||
|
#include "LiveSupport/Widgets/ComboBoxText.h"
|
||||||
|
#include "LiveSupport/Widgets/EntryBin.h"
|
||||||
|
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||||
#include "SearchWindow.h"
|
#include "SearchWindow.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,10 +74,23 @@ SearchWindow :: SearchWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
||||||
LocalizedObject(bundle)
|
LocalizedObject(bundle)
|
||||||
{
|
{
|
||||||
this->gLiveSupport = gLiveSupport;
|
this->gLiveSupport = gLiveSupport;
|
||||||
|
treeModel = Gtk::ListStore::create(modelColumns);
|
||||||
|
|
||||||
|
Gtk::VBox * searchView = Gtk::manage(new Gtk::VBox);
|
||||||
|
Gtk::VBox * advancedSearchView = constructAdvancedSearchView();
|
||||||
|
Gtk::VBox * browseView = Gtk::manage(new Gtk::VBox);
|
||||||
|
|
||||||
|
Notebook * views = Gtk::manage(new Notebook);
|
||||||
|
views->appendPage(*searchView, *getResourceUstring("searchTab"));
|
||||||
|
views->appendPage(*advancedSearchView, *getResourceUstring(
|
||||||
|
"advancedSearchTab"));
|
||||||
|
views->appendPage(*browseView, *getResourceUstring("browseTab"));
|
||||||
|
|
||||||
|
add(*views);
|
||||||
|
|
||||||
// show
|
// show
|
||||||
set_name("searchWindow");
|
set_name("searchWindow");
|
||||||
set_default_size(300, 300);
|
// set_default_size(300, 300);
|
||||||
set_modal(false);
|
set_modal(false);
|
||||||
property_window_position().set_value(Gtk::WIN_POS_NONE);
|
property_window_position().set_value(Gtk::WIN_POS_NONE);
|
||||||
|
|
||||||
|
@ -88,3 +106,61 @@ SearchWindow :: ~SearchWindow (void) throw ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------
|
||||||
|
* Construct the advanced search view.
|
||||||
|
*----------------------------------------------------------------------------*/
|
||||||
|
Gtk::VBox*
|
||||||
|
SearchWindow :: constructAdvancedSearchView(void) throw ()
|
||||||
|
{
|
||||||
|
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
|
||||||
|
|
||||||
|
// the three main components of the window
|
||||||
|
Gtk::Box * searchOptionsBox = Gtk::manage(new Gtk::HBox);
|
||||||
|
Gtk::Box * searchButtonBox = Gtk::manage(new Gtk::HButtonBox(
|
||||||
|
Gtk::BUTTONBOX_END ));
|
||||||
|
ZebraTreeView * searchResults = Gtk::manage(wf->createTreeView(treeModel));
|
||||||
|
|
||||||
|
// make a new box, and pack the main components into it
|
||||||
|
Gtk::VBox * view = Gtk::manage(new Gtk::VBox);
|
||||||
|
view->pack_start(*searchOptionsBox, Gtk::PACK_SHRINK, 5);
|
||||||
|
view->pack_start(*searchButtonBox, Gtk::PACK_SHRINK, 5);
|
||||||
|
view->pack_start(*searchResults, Gtk::PACK_SHRINK, 5);
|
||||||
|
|
||||||
|
// set up the search options box
|
||||||
|
Gtk::Label * searchByLabel = Gtk::manage(new Gtk::Label(
|
||||||
|
*getResourceUstring("searchByTextLabel") ));
|
||||||
|
ComboBoxText * metadataType = Gtk::manage(wf->createComboBoxText());
|
||||||
|
metadataType->append_text("Title");
|
||||||
|
metadataType->append_text("Creator");
|
||||||
|
metadataType->append_text("Length");
|
||||||
|
metadataType->set_active_text("Title");
|
||||||
|
ComboBoxText * operatorType = Gtk::manage(wf->createComboBoxText());
|
||||||
|
operatorType->append_text("contains");
|
||||||
|
operatorType->append_text("equals");
|
||||||
|
operatorType->append_text(">=");
|
||||||
|
operatorType->append_text("<");
|
||||||
|
operatorType->set_active_text("contains");
|
||||||
|
EntryBin * entryBin = Gtk::manage(wf->createEntryBin());
|
||||||
|
searchOptionsBox->pack_start(*searchByLabel, Gtk::PACK_SHRINK, 5);
|
||||||
|
searchOptionsBox->pack_start(*metadataType, Gtk::PACK_EXPAND_WIDGET, 5);
|
||||||
|
searchOptionsBox->pack_start(*operatorType, Gtk::PACK_EXPAND_WIDGET, 5);
|
||||||
|
searchOptionsBox->pack_start(*entryBin, Gtk::PACK_EXPAND_WIDGET, 5);
|
||||||
|
|
||||||
|
// set up the search button box
|
||||||
|
Button * searchButton = Gtk::manage(wf->createButton(
|
||||||
|
*getResourceUstring("searchButtonLabel") ));
|
||||||
|
searchButtonBox->pack_start(*searchButton, Gtk::PACK_SHRINK, 5);
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: fgerlits $
|
Author : $Author: fgerlits $
|
||||||
Version : $Revision: 1.1 $
|
Version : $Revision: 1.2 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.h,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.h,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -72,12 +72,21 @@ using namespace LiveSupport::Widgets;
|
||||||
* The Search/Browse window.
|
* The Search/Browse window.
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.1 $
|
* @version $Revision: 1.2 $
|
||||||
*/
|
*/
|
||||||
class SearchWindow : public WhiteWindow, public LocalizedObject
|
class SearchWindow : public WhiteWindow, public LocalizedObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct the advanced search view.
|
||||||
|
*
|
||||||
|
* @return a pointer to the new box (already Gtk::manage()'ed)
|
||||||
|
*/
|
||||||
|
Gtk::VBox*
|
||||||
|
constructAdvancedSearchView(void) throw ();
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,7 +94,7 @@ class SearchWindow : public WhiteWindow, public LocalizedObject
|
||||||
* Lists one clip per row.
|
* Lists one clip per row.
|
||||||
*
|
*
|
||||||
* @author $Author: fgerlits $
|
* @author $Author: fgerlits $
|
||||||
* @version $Revision: 1.1 $
|
* @version $Revision: 1.2 $
|
||||||
*/
|
*/
|
||||||
class ModelColumns : public ZebraTreeModelColumnRecord
|
class ModelColumns : public ZebraTreeModelColumnRecord
|
||||||
{
|
{
|
||||||
|
@ -129,36 +138,21 @@ class SearchWindow : public WhiteWindow, public LocalizedObject
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The GLiveSupport object, holding the state of the application.
|
|
||||||
*/
|
|
||||||
Ptr<GLiveSupport>::Ref gLiveSupport;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The column model.
|
* The column model.
|
||||||
*/
|
*/
|
||||||
ModelColumns modelColumns;
|
ModelColumns modelColumns;
|
||||||
|
|
||||||
/**
|
|
||||||
* The main container in the window.
|
|
||||||
*/
|
|
||||||
Gtk::VBox vBox;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A scrolled window, so that the list can be scrolled.
|
|
||||||
*/
|
|
||||||
Gtk::ScrolledWindow scrolledWindow;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The tree view.
|
|
||||||
*/
|
|
||||||
ZebraTreeView * treeView;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The tree model, as a GTK reference.
|
* The tree model, as a GTK reference.
|
||||||
*/
|
*/
|
||||||
Glib::RefPtr<Gtk::ListStore> treeModel;
|
Glib::RefPtr<Gtk::ListStore> treeModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The GLiveSupport object, holding the state of the application.
|
||||||
|
*/
|
||||||
|
Ptr<GLiveSupport>::Ref gLiveSupport;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -132,6 +132,13 @@ hu:table
|
||||||
searchWindow:table
|
searchWindow:table
|
||||||
{
|
{
|
||||||
windowTitle:string { "LiveSupport Keresés Ablak" }
|
windowTitle:string { "LiveSupport Keresés Ablak" }
|
||||||
|
|
||||||
|
searchTab:string { "Keresés" }
|
||||||
|
advancedSearchTab:string { "Összetett keresés" }
|
||||||
|
browseTab:string { "Nézelődés" }
|
||||||
|
|
||||||
|
searchByTextLabel:string { "Keresési feltétel:" }
|
||||||
|
searchButtonLabel:string { "Keress!" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,13 @@ root:table
|
||||||
searchWindow:table
|
searchWindow:table
|
||||||
{
|
{
|
||||||
windowTitle:string { "LiveSupport Search/Browse Window" }
|
windowTitle:string { "LiveSupport Search/Browse Window" }
|
||||||
|
|
||||||
|
searchTab:string { "Search" }
|
||||||
|
advancedSearchTab:string { "Advanced Search" }
|
||||||
|
browseTab:string { "Browse" }
|
||||||
|
|
||||||
|
searchByTextLabel:string { "Search by" }
|
||||||
|
searchButtonLabel:string { "Search" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue