// Ends-in Contrast Stretching
void CBMPFrame::OnIpEndsinContrastStretching()
{
	// TODO: 여기에 명령 처리기 코드를 추가합니다.

	// 기존 CBMPDoc을 가져옴
	CBMPDoc *pSrcDoc = GetActiveDocument();
	ASSERT_VALID(pSrcDoc);
	if (!pSrcDoc)
		return;

	// 신규 BMP 문서 (CBMPDoc) 생성 및 복제
	CBMPFrame* pDstFrm;
	CBMPView* pDstView;
	CBMPDoc* pDstDoc;
	Duplicate(&pDstFrm, &pDstView, &pDstDoc);

	// Basic Contrast Stretching
	pDstDoc->EndsinContrastStretching(m_bEcsLowEnd, m_bEcsHighEnd);

	// 제목 변경
	CString newTitle("stretched_");
	newTitle.Append(pSrcDoc->GetTitle());
	pDstDoc->SetTitle(newTitle);

	// 영상에 맞게 다시 그리기
	pDstFrm->ActivateFrame();
	pDstView->Invalidate();
}
// Histogram Equalization
void CBMPFrame::OnIpHistogramEqualization()
{
	// TODO: 여기에 명령 처리기 코드를 추가합니다.

	// 기존 CBMPDoc을 가져옴
	CBMPDoc *pSrcDoc = GetActiveDocument();
	ASSERT_VALID(pSrcDoc);
	if (!pSrcDoc)
		return;

	// 신규 BMP 문서 (CBMPDoc) 생성 및 복제
	CBMPFrame* pDstFrm;
	CBMPView* pDstView;
	CBMPDoc* pDstDoc;
	Duplicate(&pDstFrm, &pDstView, &pDstDoc);
	
	// Histogram Equalization
	pDstDoc->HistogramEqualization();

	// 제목 변경
	CString newTitle("equalized_");
	newTitle.Append(pSrcDoc->GetTitle());
	pDstDoc->SetTitle(newTitle);

	// 영상에 맞게 다시 그리기
	pDstFrm->ActivateFrame();
	pDstView->Invalidate();
}
Example #3
0
QString Global::notEmpty(const QString & title)
{
    QString newTitle(title);
    if(title.isEmpty())
    {
        newTitle = QString("(") + QObject::trUtf8("No name") + ")";
    }
    return newTitle;
}
Example #4
0
TCanvas* CreateTCanvas(const TString& name, const TString& title,
                       AliMq::Station12Type station, AliMp::PlaneType plane)
{
  TString newName(name);
  TString newTitle(title);
  TString unique = AliMq::Station12TypeName(station) + AliMp::PlaneTypeName(plane);
  newName += unique;
  newTitle += unique;
  return new TCanvas(newName.Data(), newTitle.Data());
}                     
Example #5
0
QString Global::notLong(const QString & title)
{
    QString newTitle(title);
    if(title.size() > 40)
    {
        newTitle.truncate(37);
        newTitle += "...";
    }
    return newTitle;
}
void BeAccessibleWindow::OpenDatabase(BPath path)
{
	//If a database is already open, close it before opening a new one.
	if (GlobalSQLMgr->IsOpen())
		CloseDatabase();
	
	//Open the given database
	bool databaseOpened = GlobalSQLMgr->Open(path.Path());
	
	if (databaseOpened)
	{
		//Add database to list of recently opened files
		BeAccessibleApp* myApp = static_cast<BeAccessibleApp*>(be_app);
		myApp->AddToRecentFiles(new BString(path.Path()));
		
		//Create the beaccessible_master table if it's not there
		if (!GlobalSQLMgr->TableExists("beaccessible_master"))
		{
			BString sql = "create table beaccessible_master (name Text, type Text, "
			              "value Text, primary key (name, type));";
			GlobalSQLMgr->Execute(sql.String());
		}
	}

	Lock();
	
	//Change title of window to include database name
	BString newTitle("BeAccessible : ");
	newTitle += path.Leaf();
	SetTitle(newTitle.String());
	
	//Create tab for Tables (hopefully someday Queries, too!)
	BRect frame = Bounds();
	BRect menuHeight = fMenuBar->Bounds();
	frame.top += menuHeight.Height() + 1;
	frame.InsetBy(10.0, 10.0);

	const char* tabNames[1] = {"Tables"};

	fTabView = new TabView(frame, NULL, tabNames, 1, B_FOLLOW_ALL_SIDES); 
	fTabView->SetViewColor(216,216,216,0);
	BRect ContentRect = fTabView->GetContentArea();
	ContentRect.InsetBy(5,5);

	fTableTab = new DBTabView(ContentRect, "Table");

	BView* tabs[1];
	tabs[0] = (BView*)fTableTab;
	fTabView->AddViews(tabs);
	fMainView->AddChild(fTabView);
	
	//Select the first table as default
	fTableTab->fListView->Select(0);	
	
	//Enable certain menu items since there is now a database open
	EnableMenuItems();
	Unlock();
	
	// Save the database's full path to a string
	fPath->SetTo(path.Path());
}
Example #7
0
void NMainWindow::setTitle(QString title)
{
    setWindowTitle(title);
    emit newTitle(title);
}
Example #8
0
void Home::setTitle(QString title)
{
    emit newTitle(title);
    lTextStatus->setText(title);
}