Commit 5c9a04ba authored by Claudio Valerio's avatar Claudio Valerio

fixed the search bar bug.

parent 36abfc5c
...@@ -1058,6 +1058,7 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene() ...@@ -1058,6 +1058,7 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene()
continue; continue;
} }
qDebug() << item;
UBGraphicsCache* cache = qgraphicsitem_cast<UBGraphicsCache*>(item); UBGraphicsCache* cache = qgraphicsitem_cast<UBGraphicsCache*>(item);
if(cache && cache->isVisible()) if(cache && cache->isVisible())
{ {
......
...@@ -443,11 +443,6 @@ QList<UBLibElement*> UBLibraryController::getContent(UBLibElement *element) ...@@ -443,11 +443,6 @@ QList<UBLibElement*> UBLibraryController::getContent(UBLibElement *element)
break; break;
} }
// qDebug() << "getContent()";
// qDebug() << this;
// foreach(UBLibElement*eachElement, mElementsList)
// qDebug() << eachElement;
return mElementsList; return mElementsList;
} }
......
...@@ -110,9 +110,7 @@ void UBPreferencesController::wire() ...@@ -110,9 +110,7 @@ void UBPreferencesController::wire()
for(int i = 0; i < settings->supportedKeyboardSizes->size(); i++) for(int i = 0; i < settings->supportedKeyboardSizes->size(); i++)
mPreferencesUI->keyboardPaletteKeyButtonSize->addItem(settings->supportedKeyboardSizes->at(i)); mPreferencesUI->keyboardPaletteKeyButtonSize->addItem(settings->supportedKeyboardSizes->at(i));
// mPreferencesUI->keyboardPaletteKeyButtonSize->addItem("29x29");
// mPreferencesUI->keyboardPaletteKeyButtonSize->addItem("30x30");
// mPreferencesUI->keyboardPaletteKeyButtonSize->addItem("41x41");
connect(mPreferencesUI->keyboardPaletteKeyButtonSize, SIGNAL(currentIndexChanged(const QString &)), settings->boardKeyboardPaletteKeyBtnSize, SLOT(setString(const QString &))); connect(mPreferencesUI->keyboardPaletteKeyButtonSize, SIGNAL(currentIndexChanged(const QString &)), settings->boardKeyboardPaletteKeyBtnSize, SLOT(setString(const QString &)));
......
...@@ -501,6 +501,13 @@ void UBLibActionBar::onNavigbarUpdate(UBLibElement *crntElem) ...@@ -501,6 +501,13 @@ void UBLibActionBar::onNavigbarUpdate(UBLibElement *crntElem)
} }
} }
void UBLibActionBar::onItemChanged()
{
mSearchBar->setText("");
mpSearchBtn->setEnabled(false);
}
/** /**
* \brief Construtor * \brief Construtor
* @param parent as the parent widget * @param parent as the parent widget
......
...@@ -66,6 +66,7 @@ public slots: ...@@ -66,6 +66,7 @@ public slots:
void onSelectionChanged(QList<UBLibElement*> itemList, bool isInTrash); void onSelectionChanged(QList<UBLibElement*> itemList, bool isInTrash);
void onFavoritesEntered(bool bFav); void onFavoritesEntered(bool bFav);
void onNavigbarUpdate(UBLibElement* crntElem); void onNavigbarUpdate(UBLibElement* crntElem);
void onItemChanged();
protected: protected:
void enterEvent(QEvent *event); void enterEvent(QEvent *event);
......
...@@ -73,6 +73,9 @@ UBLibNavigatorWidget::UBLibNavigatorWidget(QWidget *parent, const char *name):QW ...@@ -73,6 +73,9 @@ UBLibNavigatorWidget::UBLibNavigatorWidget(QWidget *parent, const char *name):QW
connect(libWidget->actionBar(), SIGNAL(searchElement(QString)), mLibWidget, SLOT(onSearchElement(QString))); connect(libWidget->actionBar(), SIGNAL(searchElement(QString)), mLibWidget, SLOT(onSearchElement(QString)));
connect(libWidget->actionBar(), SIGNAL(newFolderToCreate()), mLibWidget, SLOT(onNewFolderToCreate())); connect(libWidget->actionBar(), SIGNAL(newFolderToCreate()), mLibWidget, SLOT(onNewFolderToCreate()));
connect(mLibWidget, SIGNAL(itemClicked()),libWidget->actionBar(), SLOT(onItemChanged()));
connect(mPathViewer, SIGNAL(mouseClick(UBChainedLibElement*)),libWidget->actionBar(), SLOT(onItemChanged()));
mLibWidget->init(); mLibWidget->init();
} }
......
...@@ -58,16 +58,16 @@ UBLibPathViewer::UBLibPathViewer(QWidget *parent, const char *name):QGraphicsVie ...@@ -58,16 +58,16 @@ UBLibPathViewer::UBLibPathViewer(QWidget *parent, const char *name):QGraphicsVie
*/ */
UBLibPathViewer::~UBLibPathViewer() UBLibPathViewer::~UBLibPathViewer()
{ {
// if(NULL != mpLayout)
// {
// delete mpLayout;
// mpLayout = NULL;
// }
if(NULL != mpContainer) if(NULL != mpContainer)
{ {
delete mpContainer; delete mpContainer;
mpContainer = NULL; mpContainer = NULL;
} }
//if(NULL != mpLayout)
//{
// delete mpLayout;
// mpLayout = NULL;
//}
if(NULL != mpElems) if(NULL != mpElems)
{ {
delete mpElems; delete mpElems;
......
...@@ -167,6 +167,7 @@ void UBLibraryWidget::onItemClicked(QGraphicsItem *item, int index) ...@@ -167,6 +167,7 @@ void UBLibraryWidget::onItemClicked(QGraphicsItem *item, int index)
emit propertiesRequested(pElem); emit propertiesRequested(pElem);
} }
} }
emit itemClicked();
} }
} }
} }
......
...@@ -60,6 +60,7 @@ signals: ...@@ -60,6 +60,7 @@ signals:
void itemsSelected(QList<UBLibElement*> elemList, bool inTrash); void itemsSelected(QList<UBLibElement*> elemList, bool inTrash);
void propertiesRequested(UBLibElement* pElem); void propertiesRequested(UBLibElement* pElem);
void favoritesEntered(bool bFav); void favoritesEntered(bool bFav);
void itemClicked();
protected: protected:
void dragEnterEvent(QDragEnterEvent *event); void dragEnterEvent(QDragEnterEvent *event);
......
...@@ -237,16 +237,13 @@ WBTabWidget::WBTabWidget(QWidget *parent) ...@@ -237,16 +237,13 @@ WBTabWidget::WBTabWidget(QWidget *parent)
setDocumentMode(false); setDocumentMode(false);
mRecentlyClosedTabsMenu = new QMenu(this); mRecentlyClosedTabsMenu = new QMenu(this);
connect(mRecentlyClosedTabsMenu, SIGNAL(aboutToShow()), connect(mRecentlyClosedTabsMenu, SIGNAL(aboutToShow()), this, SLOT(aboutToShowRecentTabsMenu()));
this, SLOT(aboutToShowRecentTabsMenu())); connect(mRecentlyClosedTabsMenu, SIGNAL(triggered(QAction *)), this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));
connect(mRecentlyClosedTabsMenu, SIGNAL(triggered(QAction *)),
this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));
mRecentlyClosedTabsAction = new QAction(tr("Recently Closed Tabs"), this); mRecentlyClosedTabsAction = new QAction(tr("Recently Closed Tabs"), this);
mRecentlyClosedTabsAction->setMenu(mRecentlyClosedTabsMenu); mRecentlyClosedTabsAction->setMenu(mRecentlyClosedTabsMenu);
mRecentlyClosedTabsAction->setEnabled(false); mRecentlyClosedTabsAction->setEnabled(false);
connect(this, SIGNAL(currentChanged(int)), connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
this, SLOT(currentChanged(int)));
mLineEdits = new QStackedWidget(this); mLineEdits = new QStackedWidget(this);
mLineEdits->setMinimumWidth(200); mLineEdits->setMinimumWidth(200);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment