HGGitLab

Commit 5b91f336 authored by luoliangyi's avatar luoliangyi

1.HGImgView:不处理dropEvent事件,改为信号,由调用者处理

2.HGImgThumb:增加多张图片添加和插入函数
parent c082a920
This diff is collapsed.
......@@ -45,6 +45,7 @@ private slots:
private slots:
void on_currItemChanged(int index);
void on_itemDoubleClicked(int index);
void on_viewerDrop(const QString &fileName);
void on_act_thumbnailBar_triggered(bool checked);
......@@ -56,12 +57,38 @@ private slots:
void on_act_last_triggered();
void on_act_openPageNum_triggered();
void on_act_previousPage_triggered();
void on_act_nextPage_triggered();
void on_act_firstPage_triggered();
void on_act_lastPage_triggered();
void on_act_adjust_triggered();
void on_act_open_triggered();
void on_act_insert_triggered();
void on_act_closeFile_triggered();
void on_act_closeAll_triggered();
void on_act_exit_triggered();
private:
void openImageFile(int index);
HGImage createImage();
int getMultiPageCount();
private:
Ui::MainWindow *ui;
HGImgView *m_view;
HGImgThumb *m_thumb;
int m_currIndex;
int m_multiIndex;
};
#endif // MAINWINDOW_H
......@@ -4,6 +4,7 @@ EXPORTS
HGImgFmt_GetImgFmtType
HGImgFmt_GetImgFmtTypeFromFileName
HGImgFmt_IsMultiImgFmtType
HGImgFmt_LoadImage
HGImgFmt_SaveImage
HGImgFmt_OpenImageReader
......
This diff is collapsed.
......@@ -54,11 +54,14 @@ public:
HGResult getItemCount(int *count);
HGResult addItem(const QString &fileName);
HGResult addItems(const QStringList &fileNames);
HGResult insertItem(const QString &fileName, int pos);
HGResult insertItems(const QStringList &fileNames, int pos);
HGResult getItemFileName(int index, QString &fileName);
HGResult getCurrItem(int *index);
HGResult setCurrItem(int index);
HGResult removeItem(int index, ThumbRemoveFlag flag);
HGResult removeItems(const std::vector<int> &indexs, ThumbRemoveFlag flag);
HGResult removeAllItems(ThumbRemoveFlag flag);
HGResult selectItem(int index, bool select);
HGResult itemIsSelect(int index, bool *select);
......
This diff is collapsed.
......@@ -47,6 +47,7 @@ public:
signals:
void mousePos(int x, int y);
void scaleChanged(double scale);
void drop(const QString &fileName);
private:
......@@ -80,6 +81,7 @@ protected:
virtual void dropEvent(QDropEvent *e);
private:
static QString getStdFileName(const QString &fileName);
static void GetMinShowImageRect(const HGRect *pWnd, int nImgWidth, int nImgHeight, bool &bShowImage, HGRectF &rcShowImage);
static void ResizeShowImageRect(bool &bShowImage, HGRectF &rcShowImage, float fNewWidth, float fNewHeight, const HGPoint *pCenter);
static void recalcShowRect(int wndWidth, int wndHeight, int scrollSize, bool hScroll, bool vScroll, bool showImage, HGRectF &imageRect);
......
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