Fixed a signal slot error

preferencesAboutTextFull
shibakaneki 13 years ago
parent 897b4b675a
commit 45184923f3
  1. 9
      src/customWidgets/UBWidgetList.cpp
  2. 4
      src/customWidgets/UBWidgetList.h
  3. 2
      src/gui/UBTBDocumentEditWidget.cpp
  4. 1
      src/gui/UBTeacherBarPreviewWidget.cpp

@ -10,6 +10,8 @@ UBWidgetList::UBWidgetList(QWidget* parent, eWidgetListOrientation orientation,
, mMargin(5)
, mListElementsSpacing(10)
, mpEmptyLabel(NULL)
, mCanRemove(true)
, mpCurrentWidget(NULL)
{
setObjectName(name);
mOrientation = orientation;
@ -130,6 +132,13 @@ void UBWidgetList::resizeEvent(QResizeEvent *ev)
updateSizes();
}
void UBWidgetList::mousePressEvent(QMouseEvent *ev)
{
if(mCanRemove){
}
}
void UBWidgetList::updateSizes()
{
// Resize all the widgets

@ -41,7 +41,10 @@ public:
int listElementsSpacing() {return mListElementsSpacing; }
protected:
bool mCanRemove;
void resizeEvent(QResizeEvent* ev);
void mousePressEvent(QMouseEvent* ev);
private:
int scaleWidgets(QSize pSize);
@ -55,6 +58,7 @@ private:
int mListElementsSpacing;
QMap<QWidget*, QSize> mWidgetInfo;
QLabel* mpEmptyLabel;
QWidget* mpCurrentWidget;
};
#endif // UBWIDGETLIST_H

@ -120,7 +120,7 @@ UBTBDocumentEditWidget::UBTBDocumentEditWidget(UBTeacherBarDataMgr* pDataMgr, QW
connect(mpLicenseCombox, SIGNAL(currentIndexChanged(int)), this, SLOT(onLicenseCurrentIndexChanged(int)));
connect(mpKeywords, SIGNAL(textChanged(QString)), this, SLOT(onKeywordChanged(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)));
}

@ -134,6 +134,7 @@ void UBActionPreview::setContent(const QString &content)
UBTBPreviewContainer::UBTBPreviewContainer(QWidget *parent, const char *name):UBWidgetList(parent)
{
setObjectName(name);
mCanRemove = false;
}
UBTBPreviewContainer::~UBTBPreviewContainer()

Loading…
Cancel
Save