Skip to content

Commit

Permalink
Gelen Davetiye Projeye Bak Çalıştırılıyor.
Browse files Browse the repository at this point in the history
  • Loading branch information
CMLDMR committed Oct 18, 2018
1 parent 4a17949 commit dded6fa
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
3 changes: 2 additions & 1 deletion SerikGencFikir.pro
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ HEADERS += \
src/baseclass.h \
src/userwidget.h \
src/project.h \
src/davetiyewidget.h
src/davetiyewidget.h \
todolist.h

DISTFILES += \
../Release/docroot/css/css.css \
Expand Down
36 changes: 34 additions & 2 deletions src/davetiyewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,40 @@ void DavetiyeWidget::initDavetiler()
itemContainer->addStyleClass(Bootstrap::Grid::Large::col_lg_3+Bootstrap::Grid::Medium::col_md_3+Bootstrap::Grid::Small::col_sm_3+Bootstrap::Grid::ExtraSmall::col_xs_6);
itemContainer->setAttributeValue(Style::style,Style::background::color::rgba(25,75,125));
auto vLayout = itemContainer->setLayout(cpp14::make_unique<WVBoxLayout>());
auto text = vLayout->addWidget(cpp14::make_unique<WText>("Projeye Bak"),0,AlignmentFlag::Middle|AlignmentFlag::Center);
text->setAttributeValue(Style::style,Style::color::color(Style::color::White::Azure)+Style::font::size::s16px+Style::font::weight::bold);
// auto text = vLayout->addWidget(cpp14::make_unique<WText>("Projeye Bak"),0,AlignmentFlag::Middle|AlignmentFlag::Center);
// text->setAttributeValue(Style::style,Style::color::color(Style::color::White::Azure)+Style::font::size::s16px+Style::font::weight::bold);

auto downloadlink = this->download(doc["dosya"].get_oid().value);


QFileInfo
info(doc["dosyaadi"].get_utf8().value.to_string().c_str());

QString newFileName =
QString("docroot/tempfile/") +
doc["dosya"].get_oid().value.to_string().c_str() +
"." + info.suffix().toStdString().c_str();

QString downloadFileName = QString("tempfile/")+doc["dosya"].get_oid().value.to_string().c_str() + "." +info.suffix().toStdString().c_str();

std::cout << "File Renamed: " << QFile::rename(QString("docroot/")+downloadlink.c_str(),newFileName) << std::endl;


Wt::WLink link = Wt::WLink(downloadFileName.toStdString());
link.setTarget(Wt::LinkTarget::NewWindow);

std::unique_ptr<Wt::WAnchor> anchor =
Wt::cpp14::make_unique<Wt::WAnchor>(link, "Projeye Bak");

{
auto text = vLayout->addWidget(std::move(anchor),
0,
AlignmentFlag::Center|AlignmentFlag::Middle );
text->setAttributeValue(Style::style,Style::font::size::s14px+Style::color::color(Style::color::White::AliceBlue)+Style::font::weight::bold);
text->setMargin(WLength::Auto,AllSides);
}


}


Expand Down
14 changes: 14 additions & 0 deletions todolist.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#ifndef TODOLIST_H
#define TODOLIST_H


//DONE: Gelen Davetiyelerde "Projeye Bak" Çalışmıyor

//TODO: Kişilere Davet Gönderme 2 den fazla Kişiye Yapılabiliyor

//TODO: Davet Edilen Kişi Davetiyeyi Red Ettiğinde Gönderen Davetiyeyi Silemiyor.

//TODO: Ödüller Sayfası Eklenmedi

//TODO: Yarışma şartnamesi Eklenmedi

//TODO: Proje Formatı Eklenmedi.

//TODO: Logolar Değiştirilmedi.
#endif // TODOLIST_H

0 comments on commit dded6fa

Please sign in to comment.