LONG CTabbedTreeChild::OnFindReplace(WPARAM wParam, LPARAM lParam)
{
	FINDREPLACE* pFind = (FINDREPLACE*) lParam;

	/*typedef struct {    // fr
	DWORD        lStructSize;
	HWND         hwndOwner;
	HINSTANCE    hInstance;
	DWORD        Flags;
	LPTSTR        lpstrFindWhat;
	LPTSTR        lpstrReplaceWith;
	WORD         wFindWhatLen;
	WORD         wReplaceWithLen;
	LPARAM        lCustData;
	LPFRHOOKPROC lpfnHook;
	LPCTSTR       lpTemplateName;
}*/
	if(pFind->Flags & FR_DIALOGTERM)
	{
		//delete m_pFindDlg;
		m_pFindDlg=NULL;
		return 0;
	}

		getTabBar()->doFindReplace(pFind);

	return 0;
}
예제 #2
0
RMainWindowQt::RMainWindowQt(QWidget* parent, bool hasMdiArea) :
    QMainWindow(parent), RMainWindow(), mdiArea(NULL) {

// uncomment for unified tool bars under Mac:
//#if QT_VERSION >= 0x050201
//# ifdef Q_OS_MAC
//    setUnifiedTitleAndToolBarOnMac(true);
//# endif
//#endif

    if (hasMdiArea) {
        mdiArea = new QMdiArea(this);
        mdiArea->setViewMode(QMdiArea::TabbedView);
        mdiArea->setObjectName("MdiArea");
        setCentralWidget(mdiArea);

        // combine into one slot, locked by mutex:
        connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
            this, SLOT(subWindowActivated(QMdiSubWindow*)));

        // part of the workaround for QMdiArea bug
        // with events filtering through all stacked windows:
        QTabBar* tabBar = getTabBar();
        if (tabBar!=NULL) {
            connect(tabBar, SIGNAL(currentChanged(int)),
                this, SLOT(currentTabChanged(int)));
        }
        else {
예제 #3
0
void GTTabWidget::clickTab(GUITestOpStatus &os, QTabWidget* tabWidget, int idx, Qt::MouseButton button){
    GT_CHECK(tabWidget != NULL, "tabWidget is NULL");
    setCurrentIndex(os, tabWidget, idx);
    QTabBar* tabBar = getTabBar(os, tabWidget);
    QRect r = tabBar->tabRect(idx);
    GTMouseDriver::moveTo(os, tabBar->mapToGlobal(r.center()));
    GTMouseDriver::click(os, button);
}
예제 #4
0
int GTTabWidget::getTabNumByName(GUITestOpStatus &os, QTabWidget *tabWidget, QString tabName){
    GT_CHECK_RESULT(tabWidget != NULL, "tabWidget is NULL", -1);
    QTabBar* tabBar = getTabBar(os, tabWidget);
    int num = -1;
    for(int i=0; i<tabBar->count(); i++){
        QString text = tabBar->tabText(i);
        if(text == tabName){
            num = -1;
        }
    }
    GT_CHECK_RESULT(num != -1, "tab " + tabName + " not found", -1);
    return num;
}
void CTabbedTreeChild::OnEDITFindAgain()
{
	if(gsFindWhat.IsEmpty())
		OnEditFind();
	else
	{
		FINDREPLACE find;
		const char* p = LPCTSTR(gsFindWhat);
		find.lpstrFindWhat =const_cast<char*> (p);
		find.Flags=gdwFindFlags;
		getTabBar()->doFindReplace(&find);
	}

}
void CTabbedTreeChild::OnEditFind()
{
	if(m_pFindDlg)
		return;

	m_pFindDlg = getTabBar()->getFindDlg();

/*
	m_pFindDlg = new CDlgFind(); //CFindReplaceDialog();
	m_pFindDlg->Create(TRUE, "",
		NULL, //replace with
		FR_HIDEWHOLEWORD|FR_HIDEUPDOWN, // flags
		this);
*/

	// reset our index of which item we're on (is this used?)
//	m_pFindDlg->m_fr.lCustData = (LPARAM)-1;
}
예제 #7
0
RMainWindowQt::RMainWindowQt(QWidget* parent, bool hasMdiArea) :
    QMainWindow(parent), RMainWindow(), mdiArea(NULL) {

    if (hasMdiArea) {
        mdiArea = new QMdiArea(this);
        mdiArea->setViewMode(QMdiArea::TabbedView);
        mdiArea->setObjectName("MdiArea");
        setCentralWidget(mdiArea);

        // combine into one slot, locked by mutex:
        connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)),
                this, SLOT(subWindowActivated(QMdiSubWindow*)));

        // part of the workaround for QMdiArea bug
        // with events filtering through all stacked windows:
        QTabBar* tabBar = getTabBar();
        if (tabBar!=NULL) {
            connect(tabBar, SIGNAL(currentChanged(int)),
                    this, SLOT(currentTabChanged(int)));
        }
        else {
// Syncronize the data in the current view before changing the view
//	or writing out the control files
//  Called by TopicChanged and CWLangModelsDoc::OnSaveDocument
void CTabbedTreeChild::retrieveData()
{
	getTabBar()->retrieveData();
}
 //called by LangModelsDoc::TopicChanged()
void CTabbedTreeChild::TopicChanged(CWTopic* pNewTopic)
{
	getTabBar()->topicChanged(pNewTopic);
}
void CTabbedTreeChild::InterfaceChanged()
{
	getTabBar()->populate();
}
// called by tabbedTreeView::OnKeyDown when the user wants
// to switch over from the tree to the content
void CTabbedTreeChild::switchViewFocus(BOOL bToContent)
{
	getTabBar()->switchViewFocus(bToContent);
}
예제 #12
0
QString GTTabWidget::getTabName(GUITestOpStatus &os, QTabWidget *tabWidget, int idx){
    return getTabBar(os, tabWidget)->tabText(idx);
}