Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Vogtinator

Pages: 1 ... 50 51 [52] 53 54 ... 83
766
Computer Programming / Re: [QT] Desktop Derp
« on: June 10, 2013, 08:52:35 am »
thanks for all the tips! so what is the difference with
Code: [Select]
//The contructor
derp() {
posx=500;
posy=500;
}
//does (almost) the same as
derp() : posx(500), posy(500)
{}
as almost is not all the way :P
With initialization lists you can call the constructor of your parent classes and initialize const members.
http://www.cprogramming.com/tutorial/initialization-lists-c++.html
Actually, what happens in
Code: [Select]
class Foo {
private: int i;
public: Foo()
{
i = 1;
}
};
Is that i will be initialized to 0 first (default constructor) and later its value will be set.
Quote
and a somehow wanne use a ui file, but this project is actually too simple to use one so i should step away from it, just lemme code a bit, maybe magically the bug with derpy vanishing will disappear :D
That bug hasn't occured to me at all, but I noticed it's still invisible without .gifs.

767
Computer Programming / Re: [QT] Desktop Derp
« on: June 09, 2013, 03:55:58 pm »
Quote
It will compile+run without the gifs but there just won't be a derpy then.
You can embed the .gifs as resource (e.g. /gifs/<name>.gif) and load them with ":/gifs/<name>.gif" as filename.

Quote
Ok it works. BTW to compile you just do qmake then make.
Better practice is to mkdir build, cd build, qmake .. and then make, so the source directory will be kept clean.
It's easier to exclude build in .gitignore than Makefile, *.o and the other output files.

Quote
, i just looked at what qt creator sais it does, all that i need to do to compile is hit ctrl+r
ctrl+b = build and F5 = debug.
BTW: If you use qDebug() << "asdf" instead of std::cout << "asdf", debug output will only be printed in debug build.

Quote
so Vogtinator, your fix doesn't work, it still stops running the new gifs after some time/some amount of gifs played, idk which one it is.
F5 will help you ;)

Edit: Some more advice:
- Don't allocate a QMovie everytime you change the animation. Set the filename by using QMovie::setFileName instead.
- To get the screen size use
Code: [Select]
QRect screen = qApp()->desktop()->screenGeometry()- You can use the << operator instead of .append
Code: [Select]
possibleMoveActions.append("fly");
possibleMoveActions.append("flyupsidedown");
//Is the same as
possibleMoveActions << "fly" << "flyupsidedown";
-Use initialization lists:
Code: [Select]
//The contructor
derp() {
posx=500;
posy=500;
}
//does (almost) the same as
derp() : posx(500), posy(500)
{}
-You don't have to use an .ui file, you can add a QLabel as property of your MainWindow and add it using setCentralWidget(label)

768
Computer Programming / Re: [QT] Desktop Derp
« on: June 09, 2013, 02:49:18 pm »
Oh, sorry, I mistook free for delete,
Code: [Select]
delete desk; should work.

769
Computer Programming / Re: [QT] Desktop Derp
« on: June 09, 2013, 02:40:58 pm »
As simple as it sounds:
Code: [Select]
desk = new QDesktopWidget;
free desk;

Edit: If you don't use pointers, it'll be done automatically if it gets out of scope, like this:
Code: [Select]
{
QDesktopWidget desk;
}
//desk will be freed

770
Computer Programming / Re: [QT] Desktop Derp
« on: June 09, 2013, 02:36:23 pm »
Quote
And I noticed a bug  after like a sertain number of gifs it just can't load new ones anymore, any idea why?
While reading the source I noticed you're not freeing "QDesktopWidget *desk = new QDesktopWidget;", maybe that's the issue?

771
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: June 09, 2013, 02:06:27 pm »
Quote
Are you kidding me ? Sneding two files to a calc isn't that hard.
For some people at my school it seems to be. They f**ked it up and I had to do it for them.

Quote
BTW, I can't boot an external RootFS. If I load the BusyBox initrd and set root=/dev/sda2 (not an error), it can't find /dev/tty0
/dev/tty0 not found, you say? That's the case if the kernel isn't compiled with devtmpfs support.

Quote
and if I don't load an initrd, it kernel panics.
Very strange. Your ll2 contains
Code: [Select]
kernel linux/zImage.tns
cmdline root=/dev/sda2 rootdelay=5
boot
?
What's the error message exactly?

772
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: June 09, 2013, 01:47:41 pm »
Quote
Can you map the arrow keys with this kernel?
That would require some ugly hacks within the touchpad driver, because:
-How to detect whether it's a button press or mouse click?
-It's the only synaptics touchpad with arrow keys and a tactile switch
-It's a mouse after all
So it would be very difficult to persuade the maintainers to accept our patches,
but I'll try to do my best if someone has a clue how to solve #1.

Quote
can someone make an installationguide for Linux on TI Nspire in German and French?
Linux is in English so it'd be a good practice :P
As tangrs posted, a new version will be coming soon.
It wouldn't be worth the time writing a tutorial, as the installation process will get a bit more complicated :/
Project Idea for someone familiar with libti{calcs,cables,files}: Automatic ndless (and possibly linux) installer with GUI.
Maybe even a kind of app store, who knows :D

Quote
booting stocks at <RAMDISK: bzip2 image found at block 0> and then the calc freeze.
Don't worry, it takes 1-2 minutes depending on the image size.

773
Computer Programming / Re: [QT] Desktop Derp
« on: June 09, 2013, 12:57:55 pm »
Quote
Edit : Aww... maybe I'm missing the GIFs ?
I downloaded a gif and it appears, I suggest using QMovie.isValid() ;)
BTW: Compiling with qt4 works, too.

Quote
EDIT: I'm having trouble with a systemtrayicon and a rightclick-menu, if anybody wants to help me :D
I may be able to help. Did you read http://qt-project.org/doc/qt-4.8/qsystemtrayicon.html#setContextMenu]http://qt-project.org/doc/qt-4.8/qsystemtrayicon.html#setContextMenu]http://qt-project.org/doc/qt-4.8/qsystemtrayicon.html#setContextMenu?
It accepts a QMenu, like in http://qt-project.org/doc/qt-4.8/mainwindows-menus.html

BTW2: http://www.learncpp.com/cpp-tutorial/101-constructor-initialization-lists/ :P

774
TI-Nspire / Re: nspire Linux Questions
« on: May 06, 2013, 08:05:41 am »
By default the kernel tries to execute /sbin/init.
Does it exist and have the right permissions?

775
TI-Nspire / Re: nspire Linux Questions
« on: April 27, 2013, 04:01:27 pm »
It (kind of) is. You just have to change "/" to the mountpoint of the drive, which chroot does.

776
TI-Nspire / Re: nspire Linux Questions
« on: April 27, 2013, 02:06:20 pm »
Did it work? Also, why do you need to read mount --help?
If you want to know how to use it, you can read http://linux.die.net/man/8/mount, too.

777
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: April 27, 2013, 12:21:05 pm »
http://wiki.debian.org/QemuUserEmulation should help.
It seems you don't have to run it on debian, it will get executed automatically.
You also don't have to copy the files, you have to copy qemu-arm-static only.

778
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: April 27, 2013, 12:15:06 pm »
You should be able to run it directly

780
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: April 27, 2013, 12:03:47 pm »
Run the commands?

Pages: 1 ... 50 51 [52] 53 54 ... 83