Commit 45184923 authored by shibakaneki's avatar shibakaneki

Fixed a signal slot error

parent 897b4b67
...@@ -10,6 +10,8 @@ UBWidgetList::UBWidgetList(QWidget* parent, eWidgetListOrientation orientation, ...@@ -10,6 +10,8 @@ UBWidgetList::UBWidgetList(QWidget* parent, eWidgetListOrientation orientation,
, mMargin(5) , mMargin(5)
, mListElementsSpacing(10) , mListElementsSpacing(10)
, mpEmptyLabel(NULL) , mpEmptyLabel(NULL)
, mCanRemove(true)
, mpCurrentWidget(NULL)
{ {
setObjectName(name); setObjectName(name);
mOrientation = orientation; mOrientation = orientation;
...@@ -130,6 +132,13 @@ void UBWidgetList::resizeEvent(QResizeEvent *ev) ...@@ -130,6 +132,13 @@ void UBWidgetList::resizeEvent(QResizeEvent *ev)
updateSizes(); updateSizes();
} }
void UBWidgetList::mousePressEvent(QMouseEvent *ev)
{
if(mCanRemove){
}
}
void UBWidgetList::updateSizes() void UBWidgetList::updateSizes()
{ {
// Resize all the widgets // Resize all the widgets
......
...@@ -41,7 +41,10 @@ public: ...@@ -41,7 +41,10 @@ public:
int listElementsSpacing() {return mListElementsSpacing; } int listElementsSpacing() {return mListElementsSpacing; }
protected: protected:
bool mCanRemove;
void resizeEvent(QResizeEvent* ev); void resizeEvent(QResizeEvent* ev);
void mousePressEvent(QMouseEvent* ev);
private: private:
int scaleWidgets(QSize pSize); int scaleWidgets(QSize pSize);
...@@ -55,6 +58,7 @@ private: ...@@ -55,6 +58,7 @@ private:
int mListElementsSpacing; int mListElementsSpacing;
QMap<QWidget*, QSize> mWidgetInfo; QMap<QWidget*, QSize> mWidgetInfo;
QLabel* mpEmptyLabel; QLabel* mpEmptyLabel;
QWidget* mpCurrentWidget;
}; };
#endif // UBWIDGETLIST_H #endif // UBWIDGETLIST_H
...@@ -120,7 +120,7 @@ UBTBDocumentEditWidget::UBTBDocumentEditWidget(UBTeacherBarDataMgr* pDataMgr, QW ...@@ -120,7 +120,7 @@ UBTBDocumentEditWidget::UBTBDocumentEditWidget(UBTeacherBarDataMgr* pDataMgr, QW
connect(mpLicenseCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(onLicenseCurrentIndexChanged(int))); connect(mpLicenseCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(onLicenseCurrentIndexChanged(int)));
connect(mpKeywords, SIGNAL(textChanged(QString)), this, SLOT(onKeywordChanged(QString))); connect(mpKeywords, SIGNAL(textChanged(QString)), this, SLOT(onKeywordChanged(QString)));
connect(mpLevel, SIGNAL(currentIndexChanged(QString)), this, SLOT(onLevelChanged(QString))); connect(mpLevel, SIGNAL(currentIndexChanged(QString)), this, SLOT(onLevelChanged(QString)));
connect(mpTopic, SIGNAL(currentIndexChanged(QString)), this, SLOT(onTopicChanged(QString))); connect(mpTopic, SIGNAL(textChanged(QString)), this, SLOT(onTopicChanged(QString)));
connect(mpAuthor, SIGNAL(textChanged(QString)), this, SLOT(onAuthorChanged(QString))); connect(mpAuthor, SIGNAL(textChanged(QString)), this, SLOT(onAuthorChanged(QString)));
} }
......
...@@ -134,6 +134,7 @@ void UBActionPreview::setContent(const QString &content) ...@@ -134,6 +134,7 @@ void UBActionPreview::setContent(const QString &content)
UBTBPreviewContainer::UBTBPreviewContainer(QWidget *parent, const char *name):UBWidgetList(parent) UBTBPreviewContainer::UBTBPreviewContainer(QWidget *parent, const char *name):UBWidgetList(parent)
{ {
setObjectName(name); setObjectName(name);
mCanRemove = false;
} }
UBTBPreviewContainer::~UBTBPreviewContainer() UBTBPreviewContainer::~UBTBPreviewContainer()
......
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